Unit Teleport

Jenziboy

New Member
Reaction score
0
I also got a problem with teleportation the heroes.
When all the enemy heroes are dead in the arena, i want the heroes who still is inside the arena, to be teleported to the shop.
 
You could be more specific with your problem.
For now, I'll just say:
Create a trigger which picks all heroes on the map and moves them to the shop region. Run the trigger when all heroes are dead.
 
something like this should do it but you should as romek said give us more information. in this trigger i assumed that there where 2 teams fighting each other and that everyone should be teleported to the same place once the fight is over.

Code:
Teleport out [COLOR="Green"]//everything that is green isn't a part of the trigger. it's just my comments[/COLOR]
    Events
        Unit - A unit Dies
    Conditions
        (Arena <gen> contains (Triggering unit)) Equal to True[COLOR="Green"] //Arena <gen> is a region i placed over the arena[/COLOR]
    Actions
        Set unitgroup = (Units in Arena <gen> matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)))
        [COLOR="Green"]//unitgroup is a unitgroup variable[/COLOR]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in unitgroup) Equal to 0 [COLOR="Green"]//this part makes sure that all units inside of the reagion that are allied to the dead unit are dead[/COLOR]
            Then - Actions
                Custom script:   call DestroyGroup(udg_unitgroup) [COLOR="Green"]//this cleans up the leak of the unit group[/COLOR]
                Set unitgroup = (Units in Arena <gen>)
                Unit Group - Pick every unit in unitgroup and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to (Center of (Playable map area))
            Else - Actions
        Custom script:   call DestroyGroup(udg_unitgroup)

leak free and all that.
 
Teleportation

Ok, its almost like Grymlax has written, but instead they come at the same place, they should come 2 different places, 1 to there own shops, and the other to there own shops too.
 
Ok, its almost like Grymlax has written, but instead they come at the same place, they should come 2 different places, 1 to there own shops, and the other to there own shops too.

Only one of the teams are alive, so that shouldn't be a problem?

If it is, simply use unitgroup and then the condition if (owner of unit) is allied to owner of triggering unit, since the losing team will be and the other wont.
 
what he means as if 1 team wins they go to shop 1 but if the other one wins they go to the second one
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top