Set key value for Hash table

This forum is currently in read-only mode.
From the Asset Store
A template which allows you to customise the controls of your game.
  • Would it be possible to just have the 'Set key value' (hash table) automatically insert the key if it hasn't been created? This would greatly improve work flow.

    Instead of having to do something like this for every time you use the hash table:

    Event -> Delete key, insert key.

    or having an event that creates the key then an event where the key can be edited.

    It would really helpful to just be able to combine the insert/set key.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The insert key option already lets you set the value at that key.

  • That's not what I'm saying, I'd like the set key to insert the key at the same time (if the key doesn't exist).

  • but you can just insert key with value for that. what are you trying to do exactly?

  • Aeal:

    -> Insert doesn't work, if there's already a key

    -> Set doesn't work, if there isn't a key

    Checking if they exist was avoided for better performance. I really advise you to know which values you already have, and which not.

    But if you can't control knowledge about values you have: you can do work with the Function Object.

    <img src="http://www.tymczasownik.republika.pl/hashtable.png">

  • Aeal:

    -> Insert doesn't work, if there's already a key

    -> Set doesn't work, if there isn't a key

    Checking if they exist was avoided for better performance. I really advise you to know which values you already have, and which not. You can do this with the Function Object

    I know This But I was trying to understand what exactly he was trying to do with it thats all.

  • Add to the feature tracker, seems simple.

  • will do!

  • bump!

    This would be awesome, would no longer have to combine 2 actions (insert key with 0 value,then set to what you actually want) everytime to achieve what should be 1 action!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)