How do I pop a value from the middle of an array and...?

Get help using Construct 2

Post » Thu Oct 30, 2014 1:26 am

I'm currently storing side quest data in an array as a bunch of index values that I retrieve when displaying the quest log. Basically, ", set QuestLogText1 to 'Find the herbs'" and so on and so forth, with each array slot corresponding to a QuestLogText and the values within being signifiers for individual quests. New side quests that the player picks up are added to the end of the array.

When the player completes a quest that's stored in the middle of the array (and can't be popped front or back), I need to take out that number and move it to another array (CompletedQuests) while bumping up all the data behind it and maintaining the same array size so that there aren't any gaps/empty slots in the middle of the quest log. What's the best way to go about this?
Posts: 5
Reputation: 181

Post » Thu Oct 30, 2014 1:43 am

The best way is arguable but why not just move all the items up in a loop? Then push the number on your other array.
Posts: 1,646
Reputation: 6,596

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests