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

Help with simple spell

Status
Not open for further replies.
Level 11
Joined
Jun 27, 2010
Messages
614
Hey guys I wanted to know how to make a VERY simple Gold/Lumber exchange spell. One for Gold to Lumber and one for Lumber to Gold. I made a Roar and a Howl of Terror spell (Can't make two same spells because they share CD) and made a simple trigger:

12.png

11.png



The problem is that when I have for example 100 Gold and 0 Lumber, it just gives me gold (200) and stays at 0 lumber. I don't know how to make it not give gold if there's no lumber, and/or vice versa.


And another quick question:

How do I fix this tower ingame? In editor it's normal standing up but in game it's slating and it's driving me nuts.. -_-

eeffe.png

rrf.png


Thanks in advance.
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Drug Export:
  • Drug Export
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Drug Export
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current lumber) Greater than or equal to 100
        • Then - Actions
          • Player - Set (Owner of (Triggering unit)) Current lumber to (((Owner of (Triggering unit)) Current lumber) - 100)
          • Wait 0.25 seconds
          • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 100)
        • Else - Actions
Drug Import:
  • Drug Import
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Drug Import
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 100
        • Then - Actions
          • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - 100)
          • Wait 0.25 seconds
          • Player - Set (Owner of (Triggering unit)) Current lumber to (((Owner of (Triggering unit)) Current lumber) + 100)
        • Else - Actions
 
Level 11
Joined
Jun 27, 2010
Messages
614
Drug Import:
Drug Export:

Thanks a bunch! :D +rep :)

- Remove those waits
- If you want the tower to "straighten", try moving it one step down and another to the right. :)
If that doesn't work, your only other solution is to change the Max Pitch angle to about 18-24 degrees :p

Yeah haha that was the first thing I did, obviously. :p But it was to be in the corner because of the Colored Runes doodads are the runway's "landing zone".

I tried the max pitch but it didn't change it in the slightest.. :( But +rep anyways for trying :)
 
Status
Not open for further replies.
Top