Track multiple statuses from 1 variable

0 favourites
  • 3 posts
From the Asset Store
Weather Wind Sounds - Mountains contains 10 tracks (3 tracks and 7 seamless loops)
  • Hey all,

    I am wondering if there is a way to load up a single text variable with a bunch of different words, and be able to check if it contains one of those words and be able to delete just the specified words.

    I am trying to make a single variable that can store all the statuses applied to a character (like poison or haste) to try to cut down on instance variable, as there are already heaps.

    Or if anyone has any other ideas how to manage statuses it would be nice to hear :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about using an array?

  • - I actually spent a long time on this after your suggestion, and eventually decided on adding the variables for the condition to the object was in fact just easier to manage. But for additional details like time remaining, times hit, etc. that might be used by the status are stored in a dictionary that is created when the status is applied and linked to the object via UID.

    I know it probably sounds a bit much, but it has really made it much easier to manage and debug. With arrays it just takes a little more eventing time to extract the information and when you run into a problem there's a lot more possible reasons for it.

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