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

Making spells based off "Charge Gold and Lumber"

Status
Not open for further replies.
Level 2
Joined
Jun 30, 2008
Messages
19
I am attempting to create a map where you have one set of spells which you cast using mana, and another set you cast using lumber. So I found "Charge Gold and Lumber", the only spell I could find which costs resources. I want to make several spells based off this spell, including:

  1. A "Charge" ability
  2. An ability which deals damage in a targeted area
  3. An ability which deals damage to a single target unit

I was wondering if anyone knows how to make spells like this? I have absolutely no idea how to use JASS, so a GUI answer is preferably, however JASS is acceptable if I cant do this with GUI.

NOTE: I dont want to use a dummy ability that uses triggers to check the amount of lumber the player has, I want the ability to actually cost lumber, so that when you dont have enough lumber it is shaded blue to show that you cannot use it.

Thanks in advance
 
here, try this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • 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
          • Unit - Order (Triggering unit) to Undead Death Knight - Animate Dead
          • Player - Add -100 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
          • Game - Display to (Owner of (Triggering unit)) the text: Not enough gold to cast the spell
 
Last edited:
Level 6
Joined
May 7, 2009
Messages
228
Also, it's impossible to replicate Warcraft's messages using triggers because they are smaller and in a different part of the screen.
 
and the flashing blue thing doesn't work, i dont think its possible to do with triggers

Well, how else are you going to let the player casting the spell know that he needs more gold to cast it? just play the noise (Not sure what it is called) and hope for the best? atleast mines somthing to start from

and you could use the jass CallDbgMessage function, if you wanted to. i've seen it used in a spell before
 
Last edited:
Level 2
Joined
Jun 30, 2008
Messages
19
Hmm well thats annoying :sad:

Well I've made a new system which should suffice for now (doesn't use lumber), but I am still welcoming an answer if anyone can figure out how to.

EDIT: even without the icon turning blue, as it seems to be impossible.
 
Last edited:
Level 4
Joined
Apr 20, 2009
Messages
106
Apparently, through triggers, it's impossible (as far as I can discern) to force a unit to cast Charge Gold and Lumber when it would charge more than the player has. I can get it to cast any other time, except for when the charge is greater than my amount. I'll keep trying, but I don't think it'll work.
 
Status
Not open for further replies.
Top