Flying Platform Enemies?

Get help using Construct 2

Post » Mon Jan 05, 2015 11:04 am

Okay so Im not totally understanding how to make a platform enemy fly. I have a bat Enemy but I cant seem to get him to fly , thats what Im having difficulties with currently, could someone shine some light on this for me? How to go about doing it. Thanks :)!
B
6
S
1
Posts: 13
Reputation: 380

Post » Mon Jan 05, 2015 11:55 am

Is the bat using platform behavior or did you mean it's a bat in a platformer type of game?

If using platform behavior, take note of your gravity, if it doesn't float, try gravity = 0 first.

Note that platform objects will still fall even if no gravity (free fall) unless platform behavior is disabled.

You can also use other behaviors for flying, like bullet behavior (which also has a gravity parameter).

You can adjust the gravity if you want the bats to fall down to the ground (if you are supposed to hit them in your game).

Not enough info like how you coded the fly (so I can't know why it doesn't work), how your game works, etc.
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Mon Jan 05, 2015 11:58 am

If I was making a bat enemy I would just have a plain sprite, add a bullet behavior so it moves to one side, then a sine behavior so it floats up and down (as bats should). Then either spawn the guy as the player approaches or activate the bullet movement as the player approaches.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Mon Jan 05, 2015 12:05 pm

You can also set in the bullet properties for it bounce off objects for a quick and easy patrolling enemy.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Mon Jan 05, 2015 12:23 pm

I didnt even think of the bullet option duh! But I do have one question would there be a way to mirror the sprite so when it hits a solid it flips and goes the other way?
B
6
S
1
Posts: 13
Reputation: 380

Post » Mon Jan 05, 2015 12:31 pm

Is the "Set Angle" of bat set to yes?

If the bats are just moving horizontally, I would suggest setting it to No so you have more control on the appearance of the bats.

Can't you just use "on collision" or "overlapping" then "bounce off" and "set mirrored" ?

If you want to mirror it when facing left and not mirrored when facing right, you can use that (being mirrored or not) as condition for hitting against a solid to decide whether to mirror after bouncing or not.
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Tue Jan 06, 2015 2:04 am

Okay Im using Spriter so I just put the scml file into spriter and it makes the sprite, Im having a hard time trying to find "on collision" because it seems spriter has different options? unless Im missing something
B
6
S
1
Posts: 13
Reputation: 380

Post » Tue Jan 06, 2015 2:57 am

Image
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Tue Jan 06, 2015 3:07 am

Yea I found it, the spriter object itself doesnt have that option, I had to make a invisible box to get that
B
6
S
1
Posts: 13
Reputation: 380

Post » Tue Jan 06, 2015 3:12 am

You either used another trigger condition (with green arrow) or you used trigger once. trigger conditions will disappear from selection if you already have another trigger condition in your event.
B
16
S
7
Posts: 301
Reputation: 2,726


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, irina, Yahoo [Bot] and 26 guests