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
 
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.
 
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.
 
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.
 
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
 
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 The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      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