Using functions after "Create Object"

Get help using Construct 2

Post » Wed Jan 22, 2014 6:54 am

I'm trying to implement a function that uses the object created in the event before the function is called

ie.

On Function "Enemy Setup"
       <do enemy setup things; set variables, size, etc.>

Every Tick
       Create Object Enemy
       Call "Enemy Setup"

I think it has to do with parameters, but even reading the manual over and over I can't seem to figure out if it's possible.

Can anyone shed some light on this?

Thanks!

                        
B
40
S
12
G
1
Posts: 533
Reputation: 4,149

Post » Wed Jan 22, 2014 6:59 am

-Pass Enemy.UID into the function as parameter.
-Inside the function. Pick enemy by UID - Function.param(0)
B
17
S
8
G
4
Posts: 93
Reputation: 3,190

Post » Wed Jan 22, 2014 9:04 am

@c4sp3r89 - Brilliant, thanks!
B
40
S
12
G
1
Posts: 533
Reputation: 4,149


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 45 guests