Applying Global values to a Object variable on Created

Get help using Construct 2

Post » Thu Jan 12, 2017 5:07 am

Hello I'm trying to set the number of a global value to my current created sprite I made a variable in it which will hold that Number by the name of ID.

My goal is that when the object or sprite is created it will set the number of the global variable to the variable of Enemy.ID. After that a Function is called to apply all the value from and array to the Object. the monster is determinate by the ID.

But every time it create a Monster the Enemy.ID don't get the value of TestLevelMonsterID2 it is always appearing as 0 so it
just load the monster at index 0.
and I can't really see what is logically wrong I need your help guys.
I'll leave a picture of my code:
Image
B
9
S
1
G
1
Posts: 9
Reputation: 943

Post » Thu Jan 12, 2017 5:23 am

You have it backwards:
Set Enemy.ID to TestLevelMonsterID2
ImageImageImage
B
71
S
21
G
233
Posts: 3,696
Reputation: 130,368

Post » Wed Mar 01, 2017 4:37 am

It worked Thanks you very much! and i'm really sorry for the late replay. thanks again man:D
B
9
S
1
G
1
Posts: 9
Reputation: 943


Return to How do I....?

Who is online

Users browsing this forum: David181 and 22 guests