Get newly created object to modify its values

Get help using Construct 2

Post » Thu Sep 05, 2013 10:01 am

For example lets say im creating object enemy, and I want to change its property speed, hp, attack power etc - basically anything. How do I access specific object after creation from code? So I wont change all enemies properties.

Is it automatically scoped to last created object?
B
22
S
7
Posts: 94
Reputation: 1,783

Post » Thu Sep 05, 2013 10:09 am

When you create an object, it will be selected as long as its within the same action group or sub event group.
B
17
S
8
G
4
Posts: 93
Reputation: 3,190

Post » Thu Sep 05, 2013 10:10 am

Okay, and how do I scope out to get all objects?
B
22
S
7
Posts: 94
Reputation: 1,783

Post » Thu Sep 05, 2013 10:12 am

Condition->System:Pick allc4sp3r892013-09-05 10:13:54
B
17
S
8
G
4
Posts: 93
Reputation: 3,190

Post » Thu Sep 05, 2013 10:19 am

Ah okay pretty cool, so i just have to add subevent :)
Neat.
B
22
S
7
Posts: 94
Reputation: 1,783

Post » Thu Sep 05, 2013 10:21 am

You can try reading:

https://www.scirra.com/manual/75/how-events-work
B
17
S
8
G
4
Posts: 93
Reputation: 3,190


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 27 guests