• 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.

[Trigger] Spawn Rune

Status
Not open for further replies.
Level 5
Joined
Aug 9, 2012
Messages
119
like in dota, for ex: every 120scd, randomly spawn rune type in random specific region.


pls check my trigger...
says, i have 4 region... 5 different rune

i set RegionPoint[0]=region000
set RegionPoint[1]=region001
set RegionPoint[2]=region002
set RegionPoint[3]=region003

then the trigger
every 3 second.( for testing and fast result only )

set VariableX[0] = random int between 0 to 4 ( for rune type )
set VariableX[1] = random int between 0 to 3 ( for region )
if variableX[0] equal to 0 then create rune1 to center of RegionPoint[VariableX[1]]
if variableX[0] equal to 1 then create rune2 to center of RegionPoint[VariableX[1]]
if variableX[0] equal to 2 then create rune3 to center of RegionPoint[VariableX[1]]

and so on, is that acceptable for spawn rune that way?
is it totally random? since i looked up the result and sometimes

IN some region, it SPAWN the same rune again and again,
other region might spawn other rune,



Ex result :
region000, spawn rune1,rune2,rune1,rune3
region001, spawn rune3,rune4,rune0,rune1
region002, spawn rune2,rune2,rune2,rune2,rune2 <<<< this is what i wonder, is it luck or dont work properly...
region003, spawn rune4,rune0,rune3,rune0


Thx for reading and for those who repying :grin::grin:
 
Simply do this though.

First set of variables use a point array variable.
i'll call it spawnRuneLoc[]
and a unit type array and call it spawnRuneUnit
  • Set spawnRuneLoc[0] = Center of region000
  • Set spawnRuneLoc[1] = Center of region001
  • Set spawnRuneLoc[2] = Center of region002
  • Set spawnRuneLoc[3] = Center of region003
  • Set spawnRuneUnit[1] = rune1
  • Set spawnRuneUnit[2] = rune2
  • Set spawnRuneUnit[3] = rune3
Then to spawn you do event of 120 seconds.
and this trigger.
  • create unit spawnRuneUnit[random integer between 1 and 3] at spawnRuneLoc[ random integer between 0 and 3]
Thats all there is to it.
 
Level 5
Joined
Aug 9, 2012
Messages
119
got it,

BUT u say, point array variable? i use region array variable...
is it okay to use region? whats their different in this case....


Thanks :D :thumbs_up::thumbs_up:
tht will be much shorter and efficient i guess
ill try it right away
 
Status
Not open for further replies.
Top