How to show energy from variable value in text under object?

Get help using Construct 2

Post » Sun Aug 20, 2017 8:57 am

Hey
Only first enemy has text box with energy info.


Image

Image

Image
B
10
S
4
G
2
Posts: 198
Reputation: 2,384

Post » Sun Aug 20, 2017 11:32 am

Bring the box in a container with the enemy.
https://www.scirra.com/manual/150/containers

You only need 1 box in the layout, the others are auto created.
Erase that last pick based on IID.
Now your code will work (i think).

About IID.
IID is the index of an instance of an object in the Selected Objects List (picklist)

That 'On collision' picks 1 Enemy, its IID is zero (its index in that picklist)
There is no Box prepicked. So they are ALL in the picklist. Box with IID = zero is always the first one off all objects in that picklist.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Aug 20, 2017 12:01 pm

@99Instances2Go
damn genius as as usual ;-)
B
10
S
4
G
2
Posts: 198
Reputation: 2,384


Return to How do I....?

Who is online

Users browsing this forum: hao102a2 and 24 guests