How do I fix my Familiy problem ?

Get help using Construct 2

Post » Sat Jun 25, 2016 1:53 pm

hello !

Right now i have a problem with the family thing. i know this could be solved by rewriting the complete way to use bullets in my game but i would like to know if i can just easily fix it.

all my monster's bullets are grouped in the family MOBprojectile.
when MOBprjectile hit player , its destroyed and spawn a HITFLASH

now i would like use a different HITFLASH animation depending of which bullet of MOBPROJECTILE is concerned.

i try to use a different event not based on family for the details but its not working.

is there an expression like
"if mobprojectile.truename = x > spawn x_hitflash" ?


or a way to make that the events work in that order :

xbullet hit player : spawn x_hitflash
ybullet hit player : spawn y_hitflash
mobprojectile hit player : destroy mobprojectile

?


thanks for help :)
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Sat Jun 25, 2016 2:31 pm

I would give a variable to the bullets (hitflash)and name each according to the hitflash animation you want.

bullet hit player : spawn hitflash
...........................hitflash set animation to bullet.hitflash
just a thought !
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Sat Jun 25, 2016 3:56 pm

thanks a lot for your answer..

i tested your solution and it worked, but i noticed that if i placed my events differently
the "bullet on destroyed" is working , even after the "mobprojectile > destroy "


but thanks !!
B
19
S
5
Posts: 104
Reputation: 1,761


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, nahima and 16 guests