Enemy and ending

Get help using Construct 2

Post » Thu Mar 28, 2013 7:05 pm

I have a few questions.

1. How do I get my enemy to jump and use the "Add else" function? Neither is working, see pic. The "Add else" function is greyed out, too, I can't click on it. I have the Personal Version, btw.





2. How do I do multiple endings, where you get a certain ending depending on points at the end of the game? This also includes a new title screen and level selection for maximum points, while you get different ending based on lesser amount of points at the end of the game.

I want the player to not return to the old title screen and not see endings he shouldn't be without the right amount of points. Is this possible?

3. How do I get the boss to change direction when he flies in the air and falls into the ground? Like going up you see his front, than coming down you see his back.
B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Thu Mar 28, 2013 8:23 pm

1.
Instead of else, just copy the conditions and invert them.

2.
For different endings, just make a number variable named "Ending"
Once the condition has been met, set the ending to ending 1, 2, 3, ect.
Once the end of the game comes, if the ending is 1, play ending 1.

3.
I don't understand what perspective the game is being played in but it sounds like it involves animation.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Tue Apr 02, 2013 12:10 am

[QUOTE=Sushin] 1.
Instead of else, just copy the conditions and invert them.

2.
For different endings, just make a number variable named "Ending"
Once the condition has been met, set the ending to ending 1, 2, 3, ect.
Once the end of the game comes, if the ending is 1, play ending 1.

3.
I don't understand what perspective the game is being played in but it sounds like it involves animation.[/QUOTE]

These worked perfectly except for number 1.

I did this:

>Enemy variable: Action = Jump
>Event: Enemy compare variable > Action = Jump
>Action: Simulate platform control > Jump

But the enemy doesn't jump. It just sits there.

On a related note, I did this for the boss to make it shoot:

>Bullet has bullet behavior
>Boss spawn bullet
>Boss set angle toward position

But the boss shoots the bullet backwards instead of forwards.
B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Tue Apr 02, 2013 12:31 am

set instance variable in enemy. like a bolean jump false
in the event sheet set a event like this
event: enemy is jump
action: simulate platform jump.
now you need to set a condition to change jump to true like
is enemy in collition with spritex
action: set instance variable jump to true.
and he will jump
B
17
S
2
G
2
Posts: 82
Reputation: 1,712

Post » Tue Apr 02, 2013 2:45 am

[QUOTE=haifisch] set instance variable in enemy. like a bolean jump false
in the event sheet set a event like this
event: enemy is jump
action: simulate platform jump.
now you need to set a condition to change jump to true like
is enemy in collition with spritex
action: set instance variable jump to true.
and he will jump[/QUOTE]

Thanks, it worked!

But the boss is still firing backwards. I changed his settings, too, to:

>bullet = bullet behavior
>every tick = boss spawns bulletnickkname2013-04-02 03:04:54
B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Tue Apr 02, 2013 3:13 am

the boss needs to fire you right?
you can do a gun sprite and pin it to your boss and do this
event:system every x second
action: set gun sprite angle towards player.x player.y
sub event: system every x second
action:gun spawn bullet.
B
17
S
2
G
2
Posts: 82
Reputation: 1,712

Post » Tue Apr 02, 2013 8:43 pm

[QUOTE=haifisch] the boss needs to fire you right?
you can do a gun sprite and pin it to your boss and do this
event:system every x second
action: set gun sprite angle towards player.x player.y
sub event: system every x second
action:gun spawn bullet.[/QUOTE]

Thanks it works now
B
10
S
4
G
3
Posts: 210
Reputation: 5,273


Return to How do I....?

Who is online

Users browsing this forum: Vallar and 18 guests