• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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:
https://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? )
 
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.
 
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.
Back
Top