Page 1 of 1

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

PostPosted: Sun Aug 20, 2017 8:57 am
by marcinkowski
Hey
Only first enemy has text box with energy info.


Image

Image

Image

Re: How to show energy from variable value in text under obj

PostPosted: Sun Aug 20, 2017 11:32 am
by 99Instances2Go
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.

Re: How to show energy from variable value in text under obj

PostPosted: Sun Aug 20, 2017 12:01 pm
by marcinkowski
@99Instances2Go
damn genius as as usual ;-)