Get Variable Index?

emilemil1

New Member
Reaction score
20
I was just wondering if there is any way to get a variable index using a GUI action?

I'm using circle of powers as checkpoints for my AoS and they all have a set variable index, LeftLane [1-5], MiddleLane [1-5] and RightLane [1-5].

I'm currently using the well known system of:

Unit comes within 5 of XXXLane [X] -->
Set Custom Value of Unit to ((Custom Value of Unit) + 1) -->
Order (Triggering Unit) to move to XXXLane [Custom Value of Unit]

Even if it is simple, wouldn't it be easier to make something like:

Unit comes within 5 of XXXLane [X] -->
Order (Triggering Unit) to move to (Index value of (Triggering Variable) + 1)

I guess it is doable in JASS (no experience of it though), but is it doable in GUI?

The reason why I'm looking for this kind of solution is because a trigger was malfunctioning (it used unit custom values too).
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well you could just set the custom values of each circle of power to their index value ;)
 

emilemil1

New Member
Reaction score
20
I do not really get how it would help? Could you post a example code (or my lame kind without the editor xD)
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
I'd look into PUI, it's a system made by Cohadar.
 

emilemil1

New Member
Reaction score
20
I'd look into PUI, it's a system made by Cohadar.

Yes that would do it i guess, but from a quick perspective it looks like it is JASS and as it sais in the file info (not for beginners). Not that i'm a beginner, but i like the simplicity and speed of GUI :) even if you can't do advanced stuff.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
Implement PUI, all you use is GetUnitIndex(unit) in the place where the array would be.
 

emilemil1

New Member
Reaction score
20
Implement PUI, all you use is GetUnitIndex(unit) in the place where the array would be.

A straight answer, is this 100% GUI? To me it isn't.

I read through the quick instructions. It is supposed to give a unique integer to each and every unit. That is very nice and all, but i need a command to USE the integer in a GUI (order unit to move) action.

I doubt putting GetUnitIndex(unit) as a custom command for the trigger would do any good unless i have a automatic way of detecting which circle of power i stepped on?

Unit - A unit comes within 20.00 of |||Circle of Power 0219 <gen>||| Which unit condition refers to this Circle of Power??

I have a way to get a index, requiring JASS (which i specifically did not ask for). Now i just need to get the unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top