How do I make enemies absorb then explode?

Get help using Construct 2

Post » Fri Apr 03, 2015 10:23 pm

I wanna have it so when enemy is hit by lasers they absorb it and if killed with lasers when they explode they release a bullet pattern but if killed by missiles then no bullet pattern. For the other enemy if they are killed with missiles then no bullet pattern. No absorb needed for this enemy. Thanks everyone
B
17
S
4
Posts: 86
Reputation: 1,211

Post » Sat Apr 04, 2015 12:31 am

Sounds like a variable would work. When hit by a laser have the variable tick up one. Like self.absorb +1 and then when a laser destroys it right before the destroy event have it spawn a bullet maybe with a repeat equal to .absorb. So if absorb is at 6 then repeat create bullet 6 times and then figure out how your going to handle angles.

so to recap I would handle it like
local variable "absorb"
when hit by laser add 1 to absorb
when destroyed system - create object- bullet (repeat "absorb" times)
B
6
S
1
G
1
Posts: 31
Reputation: 945

Post » Mon Apr 20, 2015 9:00 pm

@heromedel ok i'll try that. Do you know how I can absorb for players special move bar? For example you know in most shoot em up games there's an energy bar that builds up when killing certain enemies or whatever and when it's full you can unleash a super move? I wanna do that also.
B
17
S
4
Posts: 86
Reputation: 1,211

Post » Tue Apr 21, 2015 1:49 pm

Again 'Variables" are the answer
Make one called "specialPower" (call it anything you like)
Then for every enemy or special enemy killed add value to that variable.
Example
enemySpecial destroyed ...add 10 to specialPower.
then have condition that is true only when the value of the variable specialPower is a pre decided one .
Example
if specialPower>=100 then.....special move "kaboom" is active
Im sure there are many ways to approach this but this is pretty straight forward.
B
17
S
4
Posts: 19
Reputation: 1,826


Return to How do I....?

Who is online

Users browsing this forum: namaewayukidesu and 8 guests