• 🏆 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!

Need help with trigger

Status
Not open for further replies.
Level 2
Joined
Jan 27, 2015
Messages
8
hiho all,

to the the trigger... I need a trigger for my map the idea is this:

When a unit buys some goods he has to bring them from city a -> b. In this time when he walks to the other city thiefs will appear (at the position of the unit who holds the items ) to steal the items from the hero . But the thiefs have to appear more than one time when he brings the goods in the other city like (endless spawn with a delay of 30 sec). When he sells the items thiefs will be removed from the world.

I think its not so easy so i need your help guys :D
 
Level 11
Joined
Jan 23, 2015
Messages
788
Well, you'll need 4 triggers (or less, idk, it may be done more simplier, but this is all i can think of right now)

So, first of all you'll need to make your item (goods) droppable on death in object editor, then...

  • GoodsBought
    • Events
      • Unit - Kael 0001 <gen> Acquires an item
    • Conditions
    • Actions
      • Trigger - Run ThievesSpawnLoop <gen> (ignoring conditions)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • ThievesSpawnLoop
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Bandit for Player 2 (Blue) at (Position of Kael 0001 <gen>) facing (Position of Kael 0001 <gen>)
      • Unit - Order (Last created unit) to Attack Kael 0001 <gen>
      • Unit Group - Add (Last created unit) to Thieves
      • Wait 30.00 game-time seconds
      • Trigger - Run (This trigger) (ignoring conditions)
  • GoodsSold
    • Events
      • Unit - Kael 0001 <gen> Pawns an item (to shop)
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Thieves and do (Unit - Remove (Picked unit) from the game)
      • Game - Display to (All players) the text: you win!!!
  • GoodsSteal
    • Events
      • Unit - Kael 0001 <gen> Dies
    • Conditions
    • Actions
      • Unit Group - Order Thieves to Right-Click (Last dropped item)
      • Game - Display to (All players) the text: HA HAAA, we got you!
is it helpful?
 
Status
Not open for further replies.
Top