• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Fix my trigger please

Status
Not open for further replies.
Level 4
Joined
Oct 31, 2010
Messages
34
This trigger is meant to get your hero to lvl 20 if you type this exact word this is a mode it is working but theres an error beacuse if red types -fun mode and a player hasnt got a hero and the player decideds to get a hero it wont turn his hero to lvl 20 i want it so that at any point if the player decides the get a hero it will turn the hero to lvl 20

this is the trigger that i have done
Fun mode
Events
Player - Player 1 (Red) types a chat message containing -Fun Mode as An exact match
Time - Elapsed game time is 50.00 seconds
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Hero - Set (Picked unit) Hero-level to 20, Hide level-up graphics
Trigger - Turn off New mass 1 <gen>
Quest - Display to (All players) the Warning message: Fun Mode has been e...
Trigger - Turn off Mass warn <gen>
 
Level 12
Joined
Aug 12, 2008
Messages
350
This mode only able to use when the player type -fun at the game time exactly on 50th seconds. That's why it doesn't work. Just remove the "Time - Elapsed game time is 50.00 seconds". If you want it only able to active after the 50th seconds, you should turn this trigger off. Then, use another trigger with the event "Time - Elapsed game time is 50.00 seconds" to turn on this trigger.

P/S: Put the text between the trigger tab to make it looks like a trigger for easy-reading.
 
you need 3 triggers and a hashtable...
- FunOn
- FunOff
- Looper

FunOn is the trigger you posted with some minor changes, save the handle of
the player to a hashtable...

FunOff is to Off the leveling of the hero which removes the saved handle for
the player...

Looper is Timer every 1 seconds, check all players handleId that is saved, if
it's true then pick every hero who has less than 20LVL, set it to 20...

and yeah you really dont need that Time Elapsed Event...
 
Level 4
Joined
Oct 20, 2011
Messages
129
Add this to your trigger
  • Set FunMode = true
If hero selection is Buy, make another trigger:
  • Events
    • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
      • FunMode Equal to True
    • Actions
      • Hero - Set (Sold unit) Hero-level to 20, Hide level-up graphics
If hero selection is trigger, add
  • Hero - Set (Sold unit) Hero-level to 20, Hide level-up graphics
after creating hero in trigger.
 
Level 4
Joined
Oct 31, 2010
Messages
34
DOESNT REALLY HELP ME i mckill could you do i gui demostration please also what i mean is that if a player types fun mode and a player hasnt got a hero and he decideds to get one after the player red types fun mode his hero doesnt get to lvl 20
 
Level 4
Joined
Oct 20, 2011
Messages
129
DOESNT REALLY HELP ME i mckill could you do i gui demostration please also what i mean is that if a player types fun mode and a player hasnt got a hero and he decideds to get one after the player red types fun mode his hero doesnt get to lvl 20

Your Trigger almost do that.
  • Events
    • Player - Player 1 (Red) types a chat message containing -Fun Mode as An exact match
    • Time - Elapsed game time is 50.00 seconds
  • Conditions
    • FunMode Equal to False
  • Actions
    • Set FunMode = True
    • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Hero - Set (Picked unit) Hero-level to 20, Hide level-up graphics
        • Trigger - Turn off New mass 1 <gen>
        • Quest - Display to (All players) the Warning message: Fun Mode has been e...
  • Trigger - Turn off Mass warn <gen>
 
DOESNT REALLY HELP ME i mckill could you do i gui demostration please also what i mean is that if a player types fun mode and a player hasnt got a hero and he decideds to get one after the player red types fun mode his hero doesnt get to lvl 20

see the map example...forget the loop I mentioned, this one is better...

commands;
-funmodeon
-funmodeoff
 

Attachments

  • FunMode.w3x
    19.9 KB · Views: 54
Level 13
Joined
May 11, 2008
Messages
1,198
make a trigger for after a hero is summoned then you check a variable. the variable will say whether red typed that chat yet. if so, then set the hero that is summoned's level to 20.

when red player types the chat command, you both make the existing heroes level 20, and set the variable that i talked about earlier. it can be an integer, from 0 to 1, or a boolean, from false to true, or whatever.

and forget about that loop nonsense...
 
Status
Not open for further replies.
Top