How to make a push-style map?

Jolly chap*

New Member
Reaction score
34
I need help in making this map, where you control one Hero and there's this "guy" in the middle and the first side to get to the "guy" will take control of him and the "guy" will move slowly to your base. If he reaches your base, you win! It's like that chapter in the actual TFT Blood Elf Campaign where you have to take a captured Illidan from Maiev's forces by taking control of him. So basically, it's like a push-style kind of game except it would be pulling the person.

My questions:
What kind of triggers should I need for the "guy"?
Is it complicated to make this kind of map?
Is it possible to just make the "guy" rescueable w/o additional triggers to make him rescued?

Sorry if this confuses you. :nuts: I'm not sure how to explain this well. Thanks in advance! :D
 

Samael88

Evil always finds a way
Reaction score
181
It can be quite easy to make one or very hard depending on how many features you want in it.

If you want to use some kind of physics engine for example it is a bit more complicated than to make a plane map with normal object editor spells.

Every time the "guy" is rescued you will need to make him rescuable again thru trigger, I think.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
well i think 1 trigger would be enough for the guy:
Code:
Untitled Trigger 001
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Point = (Position of [I]Guy[/I])
        Set UnitGroup1 = (Units within 512.00 of Point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))))
        Set UnitGroup2 = (Units within 512.00 of Point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 2 (Blue)) Equal to True))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in UnitGroup1) Greater than (Number of units in UnitGroup2)
            Then - Actions
                Custom script: call RemoveLocation (udg_Point)
                Set Point = (Center of [I]Base1[/I])
                Unit - Order [I]Guy[/I] to Move To Point
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in UnitGroup2) Greater than (Number of units in UnitGroup1)
                    Then - Actions
                        Custom script: call RemoveLocation (udg_Point)
                        Set Point = (Center of [I]Base2[/I])
                        Unit - Order [I]Guy[/I] to Move To Point
                    Else - Actions
                        Unit - Order [I]Guy[/I] to Stop
        Custom script: call DestroyGroup (udg_UnitGroup1)
        Custom script: call DestroyGroup (udg_UnitGroup2)
        Custom script: call RemoveLocation (udg_Point)
UnitGroup1 = Unit group variable without array.
UnitGroup2 = Unit group variable without array.
Point = Point variable without array.
Player 1 = Computerplayer, team 1.
Player 2 = Computerplayer, team 2.
Base1 = Rect where you want the guy to go when he is captured by team 1.
Base2 = Rect where you want the guy to go when he is captured by team 2.

this trigger will make the Guy run to the base of team 1 when there are more units owned by allies of player 1 as units owned by allies of player 2 within 512 range of the guy. The units got to be heroes.

you can just change the datas as you want.
 

Jolly chap*

New Member
Reaction score
34
Thanks, that trigger's really helpful. :D But I think maybe normal units should affect the unit too (but then again, dummy units might be in the way, so nvm). +rep to you! :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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