[Solved]Multiple Zone Portal

Level 3
Hi there! I was looking for a way that allow me to create a portal able to teleport every unit who enters to a random zone between 15 to choose, but i don't get it, maybe someone can help me with this problem... Thanks for read! Have a nice day!

Nichilus

Level 16
You need to represent the locations, where you are teleported by the portal.
This can be done by:
a) Placing regions in map, then at map initialization saving each region into region array.
b) Converting the coordinates of each location into points, saving those points into point array.

Then you make trigger which fires when you are teleported and you choose a random integer number between 1 and 15 and use that random number as an index for the region/point array.

Basically:
Map ini:
loc[1] = [0,0]
loc[2] = [5,16]
loc[3] = [-15,5]
etc.

or
reg[1] = TeleportRegion<0001>
reg[2] = TeleportRegion<0002>
reg[3] = TeleportRegion<0003>
etc.

Then
Unit is being teleported (you need to figure the event yourself)
randInt = random integer between 1 and 15
Move unit to loc[randInt] / reg[randInt]

Level 3
It works perfectly, Thank you!!!!!!!!!!!!!! I would vote you, if i knew how...

Replies
4
Views
454
Replies
1
Views
191
Replies
8
Views
256
Replies
4
Views
475
Replies
2
Views
462