Problem with private object events & platformer input bug

For questions about using Classic.

Post » Sat Dec 11, 2010 4:03 am

Hi all,

I've just started work on the third level of my platformer and have run into a couple of bugs that I could do with some help with.

The first is this:

I have one monster where in order to make it vulnerable to attacks, you must first hit it with a whirlwind. This works okay, but when I have multiple instances of the monster, all instances become vulnerable when only one is hit. I am using private variables for each monster, yet this still happens.

Secondly, I have a 'whirlwind maker' that spawns a whirlwind when hit by the player's gust attack. It also works perfectly when only one is in the game, but when a second is added I get a couple of bugs. When one is hit, all the whirlwind makers spawn a whirlwind. Also, the whirlwinds produced don't respond to the 'start ignoring input' platform command and mimic whatever the player does.

Shift - Jump & Glide
X - Gust attack (can be used to move whirlwinds)
Up arrow - Talk

http://www.lisa-rye.com/DA/GaleJungleWIP.exe
http://www.lisa-rye.com/DA/Gale19.cap
(Please do not reuse or re-post art assets from my game.)

Does anyone know how to fix these issues?

Thanks in advance!
B
4
G
2
Posts: 9
Reputation: 743

Post » Sun Dec 12, 2010 1:55 pm

I looked at you cap and got lost instantly, it's quite big. Can you describe on what layout, event sheet, event number, action is that monster? I think it could be because how you spawn enemies, because when I looked at the second problem, you use action "spawn" to create whirlwinds. I've never used that action, so I can't help you with that, but when I erased it end repleaced it with "create object", it worked. I'll have to add private variable to each whirlwind created and also each windmaker. Than compare which windmaker you're shooting at and create whirlwind at the position. Good luck, your art is beautiful.
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Mon Dec 20, 2010 2:01 am

This is just a wild guess, (if you haven't fixed this already), but perhaps when you have a monster in the event sheet, you have it so that Construct does "Pick closest to Player.X, Player.Y" or something like that.


So in the events with the monster with the whirlwind, you have it so that the whirlwind makes vulnerable the closest monster to the player (of that type).

However, a week later, and you probably already figured it out.
And if my advice doesn't help, well, sorry. : p
Check out my VGM on my soundcloud page!
Video-Game Music: E.C.2151
B
7
S
2
G
2
Posts: 193
Reputation: 1,561


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests