How to make a area(region)

make a player variable that sets to selected unit and see how that works

2 Likes

what comparison type :>>>>>>>> i mean data type

2 Likes

unit i think lol cuz im pretty sure thats the only one

1 Like

ok
then how about on the if (player name of selected player what is that;_;

2 Likes

just singles out the player so it can be sure to not choose all of the players in the region or choose the wrong player

2 Likes

is there any trigger for this?

2 Likes

hey kyle can u include the timer message too becuz im kinda confused on how to do it

2 Likes

P l e a s e h e h e : - >

1 Like

Oh, the code snippet I provided is just a loop for choosing a random map region. Here’s the code for the timer, which you can just insert the previous code snippet into:

triggers: every second
for all units in (all units in the game)
  do:
    if ((bounds of (selected unit)) overlaps with (region to teleport from)) == true
      then do:
        set entity attribute (timer) of (selected unit) as ((entity attribute (timer) of (selected unit)) - 1)
        update overlay text (top) for (owner of (selected unit)) as ( concatenate (You will be teleporting in ) (entity attribute (timer) of (selected unit)) ) for 1000 milliseconds
      else do:
        set entity attribute (timer) of (selected unit) as (10)
    if (entity attribute (timer) of (selected unit)) == 0
      then do:
        [insert previous code snippet]
2 Likes

tysm a p p r e c i a t t e d (hehe sorry for that need 20 character)

2 Likes