• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

how to create a trigger : if i type ''+unit '' then create 1 unit .then -500 gold and

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
[how to create a trigger : if i type ''+unit '' then create 1 unit .then -500 gold and if the player insufficient funds cannot type ''+unit''

Thanks guys help me with this ;):vw_death:
 
Level 15
Joined
Sep 27, 2009
Messages
669
[how to create a trigger : if i type ''+unit '' then create 1 unit .then -500 gold and if the player insufficient funds cannot type ''+unit''

Thanks guys help me with this ;):vw_death:

  • Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing +unit as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current gold) Greater than 500
        • Then - Actions
          • Unit - Create 1 YOUR UNIT for Player 1 (Red) at WHERE YO UWANT facing Default building facing degrees
          • Player - Add -500 to Player 1 (Red) Current gold
        • Else - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: You haven't got eno...
I think this will work :) !
 
Level 11
Joined
Jul 7, 2010
Messages
709
  • Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing +unit as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current gold) Greater than 500
        • Then - Actions
          • Unit - Create 1 YOUR UNIT for Player 1 (Red) at WHERE YO UWANT facing Default building facing degrees
          • Player - Add -500 to Player 1 (Red) Current gold
        • Else - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: You haven't got eno...
I think this will work :) !

That won't work Add - 500 its Add or Set!
You have to make a variable than do
Set Gold [Player number of triggering player] = Player current gold - 500
Than do Player - Set - Gold[Number of triggering player] to Player 1 (Red) Current gold

OR you can try this > http://www.hiveworkshop.com/forums/spells-569/cheat-pack-system-v1-2-a-189335/ I made it my self its like a cheat pack system dont sure if thats what your looking for ><!
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

I don't know if "Add -value" works, maybe it does, but @ x3GlikE he don't need a variable for this:

  • Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - 500)
And the cheat pack hasn't a function, that he want but I will look to it now, seems to be interesting =)
 
Status
Not open for further replies.
Top