Cohadar's Unit State System

prismpirate

New Member
Reaction score
2
Could anyone instruct me on how to use Cohadar's unit state system? I have:

  1. Copied the trigger
  2. Imported the plugins

The readme now says that I can change the unit stat by doing, for example. I don't read vJass or Jass, so the test map isn't any help.:

Code:
set Bonus_Life[whichUnit] = 4

By this, does the author mean I use the GUI function: Set Variable = Value. If so:

  1. What kind of array is Bonus_Life?
  2. How do I obtain an integer index from whichUnit?

If Bonus_Life isn't an array, then could anyone who has used the system guide me on how to implement this system?
 

Hellohihi

New Member
Reaction score
42
I never use that system before, but this is how it works probably:

JASS:
function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
set Bonus_Life<u> = 4
set u = null
endfunction</u>


That translate to this in gui:

Trigger:
  • Actions
    • Custom script: local unit u = GetTriggerUnit()
    • Custom script: set Bonus_Life<u> = 4
    • Custom script: set u = null
    • </u>
 

Cohadar

master of fugue
Reaction score
209
Code:
set Bonus_Life[whichUnit] = 4

By this, does the author mean I use the GUI function: Set Variable = Value. If so:

  1. What kind of array is Bonus_Life?
  2. How do I obtain an integer index from whichUnit?

If Bonus_Life isn't an array, then could anyone who has used the system guide me on how to implement this system?

Bonus_life is not really an array, it is a unit property.
(units are used as indexes directly, there are no integers)

You don't need to understand jass to use this.
Just read the comments is the triggers carefully, they explain it all.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top