So I've been playing with this gadget for a while now but cannot for the life of me get him to work. First of all, he floats around (no animation). I placed him on the 2nd layer on the canvas where my walls and stuff are set up (this is a sidescroller). Second, when he comes up on my character, he doesnt damage him, just pushes him around...I can even stand on top of the enemy and ride around on his head. What should I be looking for that will help me make this guy an enemy rather than just a bully pushing me around? lol
Oh and I'd like to point out that after he wandered off screen at some point, my character "died" lol.
Page 1 of 1
Making an Enemy help
#2
Posted 22 December 2010 - 08:28 AM
Hm, it sounds like there could be several problems...
First, your enemy gadget floating is likely because he doesn't have any gravity turned on. For whatever reason, IG Maker doesn't define a global gravity level - each gadget needs their own. So just switch over to your enemy's movement settings and type in an arbitrary number for gravity and give that a go. The same value as your Player's gravity would probably be a good place to start.
I'm not quite sure what you mean by "no animation." Like, you set some animations for your enemy, but in-game the enemy is just a still frame?
If so, try increasing your frames/second setting on your animations' Per Animation tab (I think that's what it's called...) and see if that helps.
For interactions with your Player gadget, it sounds like you don't have your attack collision box set up correctly. Make sure on your enemy's animations, each frame has the attack box (the red one) turned on (it is turned off by default) and at least as large as your gadget collision box (the blue one, I believe). If the red box is smaller than the blue box, the enemy will just push other gadgets when it collides with them, rather than damaging them.
I'm not sure why your Player character would die when the enemy walked off screen...?
I guess you could double-check that the enemy gadget is tied to its own health and not the Player's health.
Hope some of this was helpful. Please keep us posted on how its going.
First, your enemy gadget floating is likely because he doesn't have any gravity turned on. For whatever reason, IG Maker doesn't define a global gravity level - each gadget needs their own. So just switch over to your enemy's movement settings and type in an arbitrary number for gravity and give that a go. The same value as your Player's gravity would probably be a good place to start.
I'm not quite sure what you mean by "no animation." Like, you set some animations for your enemy, but in-game the enemy is just a still frame?
If so, try increasing your frames/second setting on your animations' Per Animation tab (I think that's what it's called...) and see if that helps.
For interactions with your Player gadget, it sounds like you don't have your attack collision box set up correctly. Make sure on your enemy's animations, each frame has the attack box (the red one) turned on (it is turned off by default) and at least as large as your gadget collision box (the blue one, I believe). If the red box is smaller than the blue box, the enemy will just push other gadgets when it collides with them, rather than damaging them.
I'm not sure why your Player character would die when the enemy walked off screen...?
I guess you could double-check that the enemy gadget is tied to its own health and not the Player's health.
Hope some of this was helpful. Please keep us posted on how its going.

#3
Posted 22 December 2010 - 09:24 AM
Thanks for the help, I'll take a look at this stuff and let ya know the verdict. You were correct about the gravity and collision detection for attacks, it seems, as the detection for attacks wasn't turned on. Also he was damaging the player when we went off screen because i accidentally checked a box that made him damage all non-ally gadgets upon death.
My question right now, though, is should I turn on collision detection for attacks on the Player gadget as well? Does that tie in to the player's health or would that be just the blue box that gives collision with gadgets? OY The collision is a pain to set with all these frames and actions XDDD
Oh and the enemy is now animating...i just forgot to check infinite loop XD
My question right now, though, is should I turn on collision detection for attacks on the Player gadget as well? Does that tie in to the player's health or would that be just the blue box that gives collision with gadgets? OY The collision is a pain to set with all these frames and actions XDDD
Oh and the enemy is now animating...i just forgot to check infinite loop XD
#4
Posted 22 December 2010 - 09:59 AM
No worries. 
The red box damages blue boxes that it touches, so you don't need to turn the red box on for your Player character (unless you want to make your Player character's attacks with it).
And for the collision boxes with your animations, wherever possible, try to use the 'Same as Previous Frame' checkbox to save on work time.

The red box damages blue boxes that it touches, so you don't need to turn the red box on for your Player character (unless you want to make your Player character's attacks with it).
And for the collision boxes with your animations, wherever possible, try to use the 'Same as Previous Frame' checkbox to save on work time.
Share this topic:
Page 1 of 1