• 🏆 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] Reloading Problem

Status
Not open for further replies.
Level 3
Joined
Jun 14, 2007
Messages
33
If anyone has ANY clue about Dawn of the Dead, again (Sorry), I need help, I have the Gold and Lumber as Clips (Gold) and Ammo (Lumber), and I have the trigger for player 1 like this-

  • Player 1 Shooting
    • Events
    • Unit - A unit is attacked
    • Conditions
    • (Owner of (attacking unit)) equal to Player 1 (Red)
    • Actions
    • Player - Set (Owner of (attacking unit)) Current lumber to ((Player 1 (Red) Current Lumber - 1)
It works great, but when your out of Lumber, you can still shoot... but I have another and I THOUGHT it would hwlp, but it doesn't... here it is


  • Order Stop
    • Events
    • Player - Player 1 (Red)'s current lumber becomes equal to 0.00
    • Conditions
    • Actions
    • Unit - Order (attacking Unit) to Stop
But then, they will not stop, and one more thing... Yes I set this up in three triggers to try and make it simple... but here is the RELOADING Trigger (Sorry for it being so long)


  • Player 1 Reloading
    • Events
    • Unit - A unit begins casting an ability
    • Conditions
    • (Ability Being Cast) Equal to Reload
    • Actions
    • Player - Set (owner of (casting unit)) current gold to (((Owner of (casting unit)) Current Gold) - 1)
    • Player - Set (owner of (casting unit)) current lumber to 50
But, when the Players gold equal to 0, it won't matter, it'll keep reloading... :sad:

Well anyways, that's all of it. :smile: If you could help me out by telling me what is wrong, or giving me an easier trigger... I'd appreciate the help, Thanks for your time :infl_thumbs_up:.
 
Last edited:
Level 12
Joined
Feb 1, 2007
Messages
1,092
You should check the conditions for something like (Owner of Triggering Units Lumber Equal to Blank) so when a unit attacks, check that condition, and one that checks if the order is an attack order, then tell it to stop.

A unit is issued an order

Owner of Triggering Units Lumber Equal to Zero
Order equal to attack

Order Triggering unit to stop

And for the reload, just check with a condition checking their gold amount.
 
Level 2
Joined
Jun 10, 2007
Messages
19
You Need an If Than Else

You must put an If-Than-Else action in there:
  • Player 1 Reloading
    • Events
    • Unit - A unit begins casting an ability
    • Conditions
    • (Ability Being Cast) Equal to Reload
    • Actions
    • If (If Conditions) then do (Then Actions) Else do (Else Actions)
      • If Conditions
        • (Owner of (Casting Unit)) gold Greater than 0
      • Then Actions
        • Player - Set (owner of (casting unit)) current gold to (((Owner of (casting unit)) Current Gold) - 1)
        • Player - Set (owner of (casting unit)) current lumber to 50
      • Else Actions
        • Do Nothing
 
Last edited by a moderator:
Level 3
Joined
Jun 14, 2007
Messages
33
That If - Condition... I can't find it, what is it under? Player Comparison? where?
Chaos, ae you talking about this...?
  • Order Stop
    • Events
    • Unit - A unit is attacked
    • Conditions
    • Owner of attacking unit's current Lumber equal to 0
    • Actions
    • Unit - Order Attacking unit Stop
That?

never mind, I found the Reload, thanks Carbloo!
 
Last edited by a moderator:
Status
Not open for further replies.
Top