0 Favourites

Track multiple statuses from 1 variable

  • 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 :)

  • Construct 3

    Buy Construct 3

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

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

  • ArcadeEd - 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Isometric multiple floors
74 9,717
eleanorawesome's avatar
eleanorawesome
Unread hot topic Locked topic
40 2,711
Ashley's avatar
Ashley Construct Team Founder
Unread hot topic
64 12,940
trollface's avatar
trollface