How do I use SELF in an action??

Get help using Construct 2

Post » Tue Jul 22, 2014 7:15 am

Hi guys,

How do I use SELF in an action?

I have lots of the same enemy on the same screen and I want the ones that have their backs to the player to turn around and face him, but I dont know how to use SELF in an action so now everyone turns around.

so please help.

Best Regards Wonamik
B
6
Posts: 37
Reputation: 324

Post » Tue Jul 22, 2014 7:25 am

Just to clarify I want to be able to use instance variable just within that particular sprite, so it dont effect all other of the same sprites on the same screen.
B
6
Posts: 37
Reputation: 324

Post » Tue Jul 22, 2014 7:27 am

I solved it, thanks anyway.
B
6
Posts: 37
Reputation: 324

Post » Tue Jul 22, 2014 7:32 am

You should use the for each condition

system for each enemy
enemy - variable = blahblah
-- enemy do action.

or you could pick enemies based on the variable

system pick enemy where variable = blahblah
-- enemy do action
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jul 22, 2014 7:52 am

Thank you!
B
6
Posts: 37
Reputation: 324


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests