Mana is its fuel

shazam ham

New Member
Reaction score
0
Hokay, so... I have a tank. I gave it mana. Now what I have been trying to do is make it lose 1 mana every 1 second. When it does it can no longer move, until givin more mana. I havent the slighest idea how to do this. I havent been able to figure out how to do it. Any help would be amazing. Thank you.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
At your unit tank at mana regeneration press shift+enter using jassnewgenpack and add the value -0.01. I think it works.
Make a periodic event with a loop time of 0.5 seconds and check your tank's mana, if it goes 0 pause the unit. When your unit is paused and its mana reaches up to a value lets say 50 unpause it.
 

shazam ham

New Member
Reaction score
0
Ha that sounds easy haha. can you switch between origional worldedit and the jassnewgen? I'm not familiar with jass yet... :thdown:
 

TomTTT

New Member
Reaction score
44
This such trigger can be easily done with GUI. Just make a periodic of 1 second, and then pick all units that are tanks, and set their mana to -1. Then make a condition, if the mana is 0 pause the unit. and make another periodic, check if units mana is 50+ and its paused, and unpause it. Tell me if you need me to show an example trigger.
 

shazam ham

New Member
Reaction score
0
If you would that would be amazing. minimum is 0.00 so im dont think i understand what you mean. Thankee :D
 

TheOverWhelm

Member
Reaction score
16
You don't need Jassnewgen to use ho;ld Shift+Enter to enter negative values.
Shazam, go to the unit, highlight Mana Regeneration. Hold shift, hit enter, enter -1.
Also, JassNewGen wont mess with anything for you. It merely adds more functionality everywhere but its highlight is JASS, so no need to worry. More GUI options too.
And as Tom said, use a Periodic Event that picks tanks and if Mana == 0 then Pause the unit, perhaps add it to a group so that you can detect when its mana isn't 0 anymore
 

shazam ham

New Member
Reaction score
0
Ok kewl. Sadly it took me a bit before I understood the - 1 regeneration thing but i figured that part out. I've found the pause/unpause thing but I cant figure out how to get it to check if mana is 0. Is it a condition? Same if checking if its not 0 anymore? If so what condition do I use? I have not been able to find one.
 

TomTTT

New Member
Reaction score
44
Yup, it's a Real Comparison.
Anyway, theres an example:
Trigger:
  • Trigger
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set UnitGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tank))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Equal to 0.00
            • Then - Actions
              • Unit - Pause (Picked unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Mana of (Picked unit)) Equal to 50.00
                  • ((Picked unit) is paused) Equal to True
                • Then - Actions
                  • Unit - Unpause (Picked unit)
                • Else - Actions
      • Custom script: call DestroyGroup(udg_UnitGroup)
 

shazam ham

New Member
Reaction score
0
Wow! You did all that in actions??? Where do I find "Set UnitGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tank)), if then and else options in the actions? I appreciate all this help! I've got to figure out how to add to your guys rep ha
 

thorhunter

You can change this now in User CP.
Reaction score
32
While mana is real value, I suggest using (greater than or equal to 50) equation, since there can be various mana regeneration bonuses. Same goes for 0 value, I'm pretty sure that with slighest mana regeneration (unless negative) you wont catch the moment with trigger when it hits 0 (unless used Unit-property event, which fits better I think)
 

TomTTT

New Member
Reaction score
44
While mana is real value, I suggest using (greater than or equal to 50) equation, since there can be various mana regeneration bonuses. Same goes for 0 value, I'm pretty sure that with slighest mana regeneration (unless negative) you wont catch the moment with trigger when it hits 0 (unless used Unit-property event, which fits better I think)
Yup, but then he needs to make 2 more triggers, one for picking all tanks and putting them into the event, and second when a tank is entering the map. And a slight delay of 1 second won't make that much of a difference. The same, you can amek it every 0.25 seconds and take down only 0.25 mana at a time. or you can even 0.01.
 

TheOverWhelm

Member
Reaction score
16
I think Greater Than works better (tanks with 100 mana! o_O), also having the boolean do a "Unit is Paused == true" and Unit is Paused == false
Conditions run much faster then actions.
Not to mention the weird pause bug. -Shrug- Just a thought!
the set Unitgroup is a unit group variable.
If then else is near the beginning of the actions list.
 

shazam ham

New Member
Reaction score
0
Alright thankee guys so I ended up using
Events
time- every 1.00 seconds of game time
Conditions
(Mana of Car 0003<gen>) Equal to 0.00
Actions
Pause Car 0003<gen>

It works but the tank starts holding the passengers hostige and wont let me unload them. I tried looking for something and changed the actions to:
Actions
Unit - Order Car 0003<gen> to unload (loading unit)
Unit - Pause Car 0003<gen>
Still will not work... Even changed to pick a specific unit to unload I've got nothing. Any suggestions?
 

TheOverWhelm

Member
Reaction score
16
Loading Unit is a back one to use.
You can simply set unit speed to 0 if it doesn't attack.
In Game Constants though, you'd need to set the min speed as 0 instead of 35 though.
 

WildTurkey

Previously known as giv_me_rep
Reaction score
87
I used to use that immolation neutral hostile skill to remove -1 mana/sec and then run a seperate loop to check for current mana levels whenever the unit is ordered to move. it saves the periodic triggers..

i dont know if this is more or less efficient BUT



Event: unit is issed an order
Condition: unit is of type (your unit)
Action:
If: Moving unit) has mana > x (x will be dependant on the mana regeneration rate of your unit...)
order moving unit to stop
else: give moving unit) permanent immolation skill)

Unit stops moving:
remove immolation skill

Unit stops an ability:
ability = immolation
order unit to stop

Hope i havn't wasted any time with a bad trigger. been years since i WCIII'd
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      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