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

Electricity system

Status
Not open for further replies.
Hello
Here is my trigger request: the electricity system:
So, a building called Generator will produce 20 points of electricity.
All building requires electricity, but they dont all requires the same amount.
Each generator produce 20 points of electricity(1= 20, 2=40, 3=60, etc..)
If there is too much building and not enought generator, all building will be down:
-1: If they was producing a unit, it will stop and wait for the electricity before to continues to produce the unit(i mean that if the unit was trained at 60%, it will continues at 60%, if it was at 75%...)
-2: Buildings will no more attacks until the electricity comes back.
-3: Units will be able to move.
-4: Building will has reduced sight range(100% to 5%)
-5: Somes building are producing ressources,(steel and Oil), by using trigger. If there is no more electricity, they will no more produce ressource(they produce them each minute)
-6: Electricity must be a kind of point, not a kind of ressource, building will reduces the amount of point. Other player will not be able to know how much electricity the foes have.
-7: If the electricity amount is under 0, there will be a way to know how much electricity the player needs to be back over 0.
-8: when the electricity is back over 0: buildings get back their sight range, buildings will produces ressources, buildings will be able to attacks, buildings will be able to train units(or continue to train them), etc...
-9: if a generator is destroyed, the amount of electricity will drop down by 20.
-10: All player begin with 30 points of electricity.
-11: Please tell me how to make a small board that tells us how much points of electricity the player has.(foes must not be able to know the amount of other player)the board must be the smallest as possible.
-12:I think that's all.
Please tell me all trigger i need to make that able in my map. And use this example, thx.

Generator: +20 points of electricity. (Is not affected by the electricity missing)
Barracks: -12 points of electricity. (has 800 sight range)
Steel mine: -6 points of electricity. (+300 steel / minute) (has 800 sight range)
Oil Platform: -8 points of electricity. (+100 oil / minute) (has 800 sight range)
Marine: trained in barracks, requires 20 seconds to be trained
(The reason of why i put this unitin the list is for you tell me how to stop the production of a unit and make it continues later) (is not affected by the electricity missing)
Laser Tower : -16 points of electricity. (has 1200 sight range and is attacking)
 
Level 8
Joined
Jun 26, 2010
Messages
530
This is kind of a complete request, should be in the request section. Also, you can edit gold icon to an bolt icon and just edit the tooltips in game interface. But if you want something like Command & Conquer with gold/ore, lumber/whatever + plus energy this system would be a bigger, would need a board to show the power generation, power usage/etc and much triggers.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
I do not understand why all buildings have to go down when you run out of power...

In real life you simply do not load the powerplant with stuff it can not support thus it would mean that some buildings would be taken down while others would remain functional.

Anyway what is stopping you from making such a system.

It is pretty much an integer comparision of power produced vs power needed. Each powerplant adds +20 to power produced.
Each building adds a variable ammount based on building type (could be from a hashtable system of multiple sellection).
When power fails you pause all buildings and pause the resource income system (or atleast that for the buildings).
When power is restored you unpause everything and restore resource systems.
When A building dies you remove its power demand / supply based on building type.

Have you even tried making it?
 
Status
Not open for further replies.
Top