• 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.

Help with simple spell

Status
Not open for further replies.
Level 11
Joined
Jun 27, 2010
Messages
626
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.
 
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
626
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