Help with fuel system

unknown666

New Member
Reaction score
5
Hey,

I'm trying to create a fuel system, when a unit enters the car it will learn the spell Engine ON, and delete Engine OFF, but now I got the problem:

What condition do I need to use to recognise the newly learned skilled .. ie.

Ability learned equal to Engine ON, and what trigger do I have to use to make the car lose mana?

Now I got

Trigger:
  • Fuel system
    • Events
    • Unit - A unit learned a skill
    • Conditions
    • Actions
      • If - Conditions
        • Then - Actions
        • Else - Actions


Kind Regards,

unknown666
 

Azlier

Old World Ghost
Reaction score
461
I think I may have something simple, because I understand nearly nothing of what you said. All you need is Immolation that deals no damage. Just change some text and edit the mana value to something like 1 and you're done... with the ability.

You would need two triggers detecting when you turn it on or off to change speed. They would have to check the order string when a unit is issued an order, I'd do it myself but I don't have WC3 anymore. the only problem with this is that you could drive the car even without a driver...

EDIT: I see you now posted a trigger. It will only work if the car is a hero learning an ability... I think.
 

Cookiemaster

New Member
Reaction score
36
Base the engine ON ability on Brilliance aura, set percent bonus to false and set mana regeneration increase to a negative value. Make sure to add "Self" to targets allowed.
 

Curo

Why am I still playing this game...?
Reaction score
109
Code:
Events
   A unit is loaded into a transport
Actions
   Unit - Remove ability (Engine OFF) from [I]transport[/I]
   Unit - Add ability (Engine ON) to [I]transport[/I]

Then have a periodic trigger:

Code:
Events
   Every [I]x[/I] seconds of game time
Actions
   Set [I]unit_group[/I] = Units of type [I]transport[/I]
   Pick every unit in [I]unit_group[/I] and do:
      If  - (Picked unit) has ability (Engine ON)
      Then - Set (Picked unit) mana = ((Picked unit) mana - [I]consumed fuel amount[/I])
   Custom script: Call DestroyGroup (ugd_unit_group)

Something like that? Done freehand so it may have errors.

The Brilliance Aura thing works as well assuming you have no other need for Brilliance Aura and you don't mind the 2 extra seconds auras last after you remove them. My trigger can also be tweaked if you want to use gold, lumber, food, or health as fuel instead of mana.

Personally what I would do for my own purposes is make a spell called Turn Engine On/Off that requires a dummy unit named "Driver". Then I would use a trigger that detects when a unit is loaded into the car, and create/transfer the dummy unit for/to the owner of the driver unit. Then I would have another trigger that detects when "Turn Engine On" is used, and I would start a timer that periodically drains fuel/mana. Likewise, when "Turn Engine Off" is used, pause/destroy the timer. But that's just me. I like that because you can have a unit in the car with the engine still off, and you can turn it on and off whenever you want as long as there is a driver.
 

unknown666

New Member
Reaction score
5
thank's for the reply, both, and sorry I made the thread so unclear =\

@cookiemaster
I got the brilliance aura now, but I can't set the mana regeneration bonus to a negative value.

@azlier
the immolation is a good idea, but I go with curo's triggers.
And you brought me on the idea to make extra speed on costs of more mana and slower on less mana, thanks alot ^^

@Curo
Aah, that one would do the trick :) thanks for your time

all 3 +rep
 

Azlier

Old World Ghost
Reaction score
461
I got the brilliance aura now, but I can't set the mana regeneration bonus to a negative value.

Hold shift while opening the field up and edit the value?
 
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