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

Mana Being Fuel

Status
Not open for further replies.
Level 6
Joined
May 26, 2010
Messages
212
I've seen this before but i dont know how to actually make it. A unit can't move normally but when it uses a spell it can move. The spell drains a mana a second and can be deactivated (Like Immolation). Anybody know hoiw to do this?
+rep to whoever can help me.
 
Use Bear Form ability, with the first unit being unable to move and the other one able of moving. The mana is triggered, when a unit is issued an order with no target and this order is "bearform", then add this unit to a Unit group. Another trigger will fire up, running every 1.00 second, that picks all units in that Unit group and sets their mana to (Mana of (Picked unit)) - X. Also, make a check, when the group is empty (Boolean comparison), turn off the trigger. Another check of whether the mana of unit is less than X will issue the unit to unbearform: Unit - Issue (Picked unit) to Night Elf Druid of the Talon - Night Elf form. Finally, when a unit is issued an "unbearform" order (String Comparison), remove it from that Unit group.
 
Level 15
Joined
Mar 8, 2009
Messages
1,649
No need to bother with unit groups - you can just give the alternate form negative mana regeneration.
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
Use permanent immolation and bear form, at the first the unit's movement is in none, and it's ms is 0, use bear form to change the unit, alternate unit must have permanent immolation and unbear form, or atleast same ability that transform it back to the unmoveable

To check, i suggest using the unit group, when the mana of unit become 0 then order to druidofthetalon-unbearform
 
Level 6
Joined
May 26, 2010
Messages
212
alright i did what u guys said. It didnt work, these are the triggers.

  • Fuel Start
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order((Name of Activate Engine )))
    • Actions
      • Unit Group - Add (Triggering unit) to Ship_Fuel
  • Fuel Drainage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Ship_Fuel and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.00)
  • Fuel Off
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Ship_Fuel and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Argent Dawn (Activated)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Integer((Mana of (Picked unit)))) Equal to 0
                • Then - Actions
                  • Unit - Order (Picked unit) to Night Elf Druid Of The Talon - Night Elf Form
                • Else - Actions
            • Else - Actions
  • Fuel Off 2nd
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order((Name of Activate Engine )))
    • Actions
      • Unit Group - Remove (Triggering unit) from Ship_Fuel
 
Use a wait event before adding the unit to the unit group.And also for the
base.gif
Fuel Off trigger you used two usless if then els do functions and instead you could of just done one. :p
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's Pharaoh_'s suggestion in a test map.

http://www.hiveworkshop.com/forums/pastebin.php?id=9debjo


  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(bearform))
          • (Issued order) Equal to (Order(unbearform))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(bearform))
        • Then - Actions
          • Unit Group - Add (Triggering unit) to BearGroup
          • Trigger - Turn on Untitled Trigger 002 <gen>
        • Else - Actions
          • Unit Group - Remove unit from BearGroup
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BearGroup is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off Untitled Trigger 002 <gen>
            • Else - Actions
  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BearGroup and do (Actions)
        • Loop - Actions
          • Set unit = (Picked unit)
          • Unit - Set mana of unit to ((Mana of unit) - 2.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of unit) Less than 1.00
            • Then - Actions
              • Unit Group - Remove unit from BearGroup
              • Custom script: call IssueImmediateOrder(udg_unit , "unbearform")
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BearGroup is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Do remember that stationary units should drain fuel slower than ones in motion. This is to add some realisim.

Your car stopped at a robot consumes very little fuel compared to when racing across a motor way at 80 mph.

Ironically this is very easy to do in SC2 yet very difficult in WC3.
 
Level 15
Joined
Mar 8, 2009
Messages
1,649
Do remember that stationary units should drain fuel slower than ones in motion. This is to add some realisim.

Your car stopped at a robot consumes very little fuel compared to when racing across a motor way at 80 mph.

Ironically this is very easy to do in SC2 yet very difficult in WC3.

I hoped to do this with several chain-linked bear-form-based spells (units with different speed and different mana degeneration). Didn't work. =)))
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Now it has a base cost when not moving, and additional cost when moving. The cost is based on distance moved.

  • Init Mana Fuel
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set MF_Hash = (Last created hashtable)
      • Set MF_Interval = 0.20
      • Set MF_ManaCost = 2.00
      • Set MF_ManaCostMove = 3.00
      • Trigger - Add to Mana Fuel Cost <gen> the event (Time - Every MF_Interval seconds of game time)
      • -------- ---------------------------------------- --------
      • Set MF_DistMax = (522.00 x MF_Interval)
      • Set MF_ManaCost = (MF_ManaCost x MF_Interval)
      • Set MF_ManaCostMove = ((MF_ManaCostMove x MF_Interval) / 100.00)
Set MF_Interval = How often the looping trigger loops, mana is checked/drained and distance checked.
Set MF_ManaCost = Base mana cost per second
Set MF_ManaCostMove = Bonus mana cost per 100 distance moved per secon
MF_DistMax = If the unit has moved more than this it must have teleported.

For DistMax I was thinking of a situation where you teleport. That could possible drain all your mana. Since moving speed is capped at 522, I applied that limit. However the system won't catch shorter teleports than that. You'd need extra triggering.

http://www.hiveworkshop.com/forums/pastebin.php?id=c9x3yo
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
don't use bear form for heros
it might crash warcraft because this spell is ment to work with non-hero units only(or at least it did last year)
others like metamorphosis or robo goblin form which are ment for heros are better
or since you are using a trigger anyway you can replace the unit with the trigger which gives more options
 
Status
Not open for further replies.
Top