Grab Lowest Actor in list

skippertech

  • Posts: 256
I have a list in which I add actors to it, Is there anyway I can set another attribute to the lowest actor in the list, for example take priority over the actor in the 0 slot, versus the actor in the 1 slot..

Tuo

  • *
  • Posts: 2469
What do you mean by "lowest actor"?

One way to do it would be to basically use text to make lists within the lists. For example, you could store "Actor1 5" and "Actor2 10", where the second number is the priority level. Then, you can convert that text to a list itself, compare the priority levels and then create the corresponding actor. I do a somewhat similar idea in my "Demo- Actorless Card Duel", which you can find in the games section of the StencylForge.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

skippertech

  • Posts: 256
What do you mean by "lowest actor"?

One way to do it would be to basically use text to make lists within the lists. For example, you could store "Actor1 5" and "Actor2 10", where the second number is the priority level. Then, you can convert that text to a list itself, compare the priority levels and then create the corresponding actor. I do a somewhat similar idea in my "Demo- Actorless Card Duel", which you can find in the games section of the StencylForge.

Lowest actor as in value in lowest spot, lets say there is an actor in the 1, the 2, and the 3 spot, it would pick the actor in the 1 spot. if there was an actor in the 100, 150, 200, it would pick the one in the 100th (assuming there were no other actors in the 100 spot below it)


colburt187

  • *
  • Posts: 2416
Have a look at the behaviour i attached in the other post, you make an attribute called target, Set target to item #0 in list, when the target  is killed or leaves the region it is removed from the list and the actor above becomes #0 and the new target.

skippertech

  • Posts: 256
Have a look at the behaviour i attached in the other post, you make an attribute called target, Set target to item #0 in list, when the target  is killed or leaves the region it is removed from the list and the actor above becomes #0 and the new target.

Haha okay thanks I will, for some reason stencyl wasn't notifying me on that thread even though I told it to:(