(TURN-BASED) How do I cycle through available choices consisting of created sprites?

0 favourites
  • 4 posts
From the Asset Store
A well commented RPG game template to learn from or use as a base for your own game!
  • Hello.

    I'm trying to come up with what I would call the foundation of a turn-based combat system. Specifically one that deals with multiple enemies and even multiple of the same sprite. Unfortunately I'm not entirely sure how to go about it.

    Let me describe my issue with some comparison. When it comes to dealing with sprites in Construct, it's very easy to interact with and affect a unique sprite via built in features such as collision or mouse click. Those choices are easily implemented in combination with "Pick by unique ID".

    But when it comes to a typical RPG turn-based setup, how would I be able to implement a dynamic cycle of highlighted choices based on the spawned enemy sprites (which enemy to attack)? Is it possible to create some sort of temporary list of stored values that includes the sprite's unique ID? I imagine then you could set up some kind of comparison to the list and easily highlight the targetted sprite (and interact with it).

    I'm really hoping someone can show me how to handle a bunch of unique sprites without any visible interaction (e.g. sprite collision or mouse click).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would use the Pick Nth instance system condition. It is basically picking by IID.

    Keep track of the "current" instance in a variable, and you can increase and decrease that by 1 through input, and pick the proper enemy sprite based on that, from 0 to enemySprite.count.

    If you need some other sort of order, you could add an instance variable to the enemy sprite and pick by comparing that for more control.

  • On combat start - For Each Sprite, set "tag"(or any variable you create) variable to loopindex. When choosing the specific sprite, compare that tag variable.

  • I thank you both for your takes on my request. It was helpful since I tried to set up both of your solutions but I came up with a third one! I created a family and included the relevant sprites. Whenever one is created, it receives a value to its instance variable based on Family.Count.

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