Fuel for units?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
BouilloireEtFruits
Posts: 1
Joined: April 20th, 2021, 5:36 am

Fuel for units?

Post by BouilloireEtFruits »

Hello Wesnoth-community!
I´ve been playing this game for a while now without any modding or custom stuff. But recently I got interested in it. I made some custom units and abilities in a modern setting, with ships, planes and stuff. There is one problem I came across, the fuel for the planes. I wanted to make units with the ability to refuel planes like an aircraftcarrier, but I dont´t actually have an idea on how to implement this stuff. I would just need a bit of help on how to visualize the fuel and set the variables and events correctly. Has anyone already made such an add-on or has someone any helpful informations about it? I would be really thankful if anyone could help me.
gnombat
Posts: 669
Joined: June 10th, 2010, 8:49 pm

Re: Fuel for units?

Post by gnombat »

To visualize the fuel, you could add another bar alongside the unit, as seen in the add-on A Magicians Tale:
The elf and the mage have an additional bar on their right
The elf and the mage have an additional bar on their right
A_Magicians_Tale.png (72.07 KiB) Viewed 381 times
Post Reply