How do I keep unique ID once created?

Get help using Construct 2

Post » Mon Feb 06, 2017 8:11 pm

Greetings there! ^_^
So - with some help i created an item drop system simmilar to Borderlands and Diablo 3. When an item is dropped, (on created)
Set (all of the ID Below) To random (3) On each. Now it works fine - as it looks that all stats are random. I made a display text for each one of the stats to show when character is overlapping the item.

Now the problem is, when a weapon is created and all of the ID sets to randomly - it displays the item text just fine.
However when ANOTHER item drops, it overrides the last items stats too, it changes, how come? O.o
I want it to keep the value it had *when* it dropped/was created.

I gave the Item instace variables;
ItemLevelID
ItemStrengthID
ItemDexterityD
ItemVitalityID
B
5
S
1
Posts: 37
Reputation: 451

Post » Mon Feb 06, 2017 8:15 pm

It's hard to tell without seeing your events, but basically you need to figure out a way to assign those values at the time the new item is created.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Mon Feb 06, 2017 8:17 pm

Burvey wrote:It's hard to tell without seeing your events, but basically you need to figure out a way to assign those values at the time the new item is created.


It is 'On created' -> But the older items on the ground changes value too.
If on new item created, set Dexterity to = 0, then the old item on the ground will also be 0 Dexterity
B
5
S
1
Posts: 37
Reputation: 451

Post » Mon Feb 06, 2017 8:29 pm

That just means that you're not picking correctly yet.

Can you post an image of how you have your events set up?
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests