Mana for movement speed?

Andyoyo

TH.net Regular
Reaction score
22
I need a way for a unit's mana to deplete only while moving & once the unit is out of mana it can no longer move. What would I set the movement speed to in the object editor & what triggers do I use? I'm using this for a turn based strategy game
 

Nerfpl

New Member
Reaction score
53
E: Unit is issued a order targeting a point
C: mana < X
A: Ordet to stop / set move speed to 0%

thats for stoping, move is bigger problem
 

Trollvottel

never aging title
Reaction score
262
freehand:

map init:
set U = your unit
set lastloc = position of U

every 0.5 seconds of game:


set loc = position of U
set dis = distance between loc and lastloc
custom script: call RemoveLocation(udg_lastloc)
set lastloc = loc
Unit - set mana of U to current mana of U - dis
if dis < 20 then
Unit - pause U
endif
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top