• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

trigger help

Status
Not open for further replies.
Level 1
Joined
Jul 10, 2010
Messages
3
Hey i didn't know where to post this,so i posted it here(i'm new to forum)
I need help with couple of triggers,I am in a map project and i want to
make Players teleport to region when they type -Boss.
Beacouse There is Mega Boss I wanted to make them all allies in that region

So these are requests:
1.To teleport Hero On region when he types -boss
2.When they get to boss area,they should be allies(if they come to boss area they become allies)


So that's it

Thanks i know someone will help :))
 
Level 5
Joined
May 31, 2009
Messages
122
  • Event
    • Player - (Player 1 (red)) types chat message containing (-boss) as an exact match
  • Actions
    • unit group - pick every unit in (Unit group) and (move instantly to (centre of (boss region))
    • Player - Make player 1 treat player 2 as ally
    • Player - make player 1 treat player 3 as ally
  • ------ etc. etc. etc.

You have to redo this for every player ,and for the "unit group part", make sure you add all heroes to a specific unitgroup beforehand or something. Sorry this trigger really sucks, but im just feeling lazy right now.
 
Level 11
Joined
Dec 5, 2009
Messages
846
Ye you could do like that but he said if they leave the region they will be unallies. So do like this :

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -boss as An exact match
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (How you want to pick the units))
      • Set Temp_loc = (Center of (Boss <gen>))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to Temp_loc
  • Custom script: call RemoveLocation(udg_Temp_loc)
  • Custom script: call DestroyGroup(udg_Temp_Group)
Remember the name of your variable. Because when you use custom script big letters and small letters matters.

next trigger..

  • Untitled Trigger 002
    • Events
      • Unit - A unit enters Boss <gen>
    • Conditions
    • Actions
      • Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally
      • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Ally
      • Player - Make Player 1 (Red) treat Player 4 (Purple) as an Ally
  • Untitled Trigger 003
    • Events
      • Unit - A unit leaves Boss <gen>
    • Conditions
    • Actions
      • Player - Make Player 1 (Red) treat Player 2 (Blue) as an Enemy
      • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Enemy
      • Player - Make Player 1 (Red) treat Player 4 (Purple) as an Enemy
 
Status
Not open for further replies.
Top