Shooting requires mana

Sirroelivan

Gunnerkrigg Court
Reaction score
95
How can you make it so, that whenever a unit shoots, it uses up one mana and when it doens't have any mana left, it can't shoot at all.
 

Rinpun

Ex TH Member
Reaction score
105
Define shooting. There are many ways you can do this. Some just use a searing arrows or someat modified ability to fire and use up 1 mana. And then, to boot, the units attack can be set to 0 (so when the unit attacks its searing arrow modification does the actual damage) and triggers can be made so that the shooting ability is always activated.
 

Anachron

New Member
Reaction score
53
To make it work simply use this!!!

You need 1 trigger.

Ok my idea:
Each time your hero / unit shot it will loose mana.
So we make a trigger which simply remove 1 mana with each shot and check if it can shot before every attack.

Event:A unit attacks a unit
Condition: Unittype of Triggering unit equal to *Your Unit type of the shooting unit*
Action:
If Then Else do (Mulitiplicate actions)
If
Mana of triggering unit equal or bigger than 1.00
Then do
Unit - Set Mana of Triggering unit to (mana of(Triggering Unit)-1.00)
Else do
Unit - Order Triggering unit to stop

That is all!^^
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
I mean attacking (but for your searing arrow idea, would it be possible to hide the ability e.g. put it in a dummy spellbook and then disable the spellbook at the beginning of the game?)
 

Rinpun

Ex TH Member
Reaction score
105
I mean attacking (but for your searing arrow idea, would it be possible to hide the ability e.g. put it in a dummy spellbook and then disable the spellbook at the beginning of the game?)

Yes :)

Not worth doing the triggering Dhk is suggesting. Stopping is rather bothersome. I suppose you could use it, but anyone with a fast attack can sometimes bypass it. If you use the trigger he's suggesting, you don't need any abilities, but it's harder to modify his attack (if you want to do that) and, as mentioned, stopping is bothersome. You can, however, achieve a much better stop in JASS, where you can simply:

Code:
call PauseUnit(x,true)
call IssueImmediateOrder(x,"stop")
call PauseUnit(x, false)
 

Rinpun

Ex TH Member
Reaction score
105
Yes it can. Give it -1 attack (shift click and set it) and 1 dice and side.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top