0 Favourites

How do I keep unique ID once created?

  • 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

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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

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

    Can you post an image of how you have your events set up?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic Locked topic
220 14,893
Tom's avatar
Tom Construct Team Founder
Unread hot topic
99 10,152
karshinkoff's avatar
karshinkoff
Unread hot topic
0 Favourites
Keep me logged in.
66 5,736
grigrizljac's avatar
grigrizljac