• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

need some array help!

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
I'm trying to use array so more now, but I still have problem with understanding. I readed the whole torial:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/array-tutorial-17789/

set Casting_Unit = CasterUnit[index number of owner of Triggering Unit]
set Target Unit of ability being cast = TargetedUnit[index number of owner of Triggeirng Unit]

I tried to make that trigger but i cant. What variables dit he used?

or is there any1 with a good torial map for arrays that also can find playernumbers? (btw: is player red playernumber 1 or 0? )
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Caster_Unit is a unit
Target_Unit is a unit
CasterUnit is a unit array
TargetedUnit is a unit array

Arrays are like multiple vaiables put in sequential order letting you access one of them via an index (integer). They are very useful if you want to alter the variable from which data comes from using an integer.
 
Level 7
Joined
Jun 15, 2010
Messages
218
but if caster unit is a unit variable, then how the hell does world edit knows that u mean The casting unit? Is it possible that he wrote it wrong and that the trigger should be like:

Set CasterUnit[(Player number of (Triggering player))] = (Casting unit)

and that the (Casting unit) is not a varribale ?
 
Status
Not open for further replies.
Top