Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Arnadath proudly presents His first magnificent and leakless (hope so) system.
-What is this thing?
-This is a system in which every unit that enters water, gets breath. By depleting it's breath, it will start to lose life, while if it goes outside water, its breath will start increasing again
Requirements: Just a perfectly normal World editor
[+] Multiinstancable (mui) [+] Not lagging (depends on pc...) [+] Can get variations between monsters (naga e.g. lose less breat than humans) [+] GUI (so anyone can understand it) [-] The breath bar, might blink (depends on your pc)
So far as i can see, no one thought of that.
For troubleshooting, please read the Q&A
Q&A
Q:Is it M...
A:Yes it is MUI i told you already
Q:Were can it..
A:It can be usefull on RPG maps mostly. Think were it could suit best for you
Q:How to imp...
A:Just copy the whole folder into your map
Q:Shall i...
A:Of course! Every feedback is welcome
Q:No i mean...
A:Give me credit if you use it? Well of course
Q:If i find...
A:Contact me at my email or pm me
Q:How can you...
A:I know what im about to ask myself, thats why i answer mine question faster that i can write them.
I wrote Q&A in this manner so you bother to read them.
V1.0a:First and maybe last release
V1.0b:Fixed leaks pointed out
V1.1a:Modified so flying units dont use the system
V1.2a:Fixed the *blinking bar*, and update it so that when you are outside water, it turns white and shows your breath increasing. Also elevated it so that it is above your head.
Known bugs
The only one i can imagine, are several problems with the blinking breath bar. But it depends mostly on your computer
Also the full GUI script:
Drowninit
Events
Map initialization
Conditions
Actions
Game - Display to (All players) for 900.00 seconds the text: |CFFFF9835For anyth...
Hashtable - Create a hashtable
Set HASH_Drowning = (Last created hashtable)
Trigger - Run DrownputinhashInit <gen> (ignoring conditions)
Drownputinhash
Events
Unit - A unit enters (Playable map area)
Conditions
((Unit-type of (Entering unit)) is A flying unit) Equal to (==) False
Actions
Hashtable - Save Handle Of(Entering unit) as Drown_int of 1 in HASH_Drowning
Hashtable - Save 100.00 as Drown_int of 2 in HASH_Drowning
Set Drown_int = (Drown_int + 1)
Drownputinhash
Events
Unit - A unit enters (Playable map area)
Conditions
((Unit-type of (Entering unit)) is A flying unit) Equal to (==) False
Actions
Hashtable - Save Handle Of(Entering unit) as Drown_int of 1 in HASH_Drowning
Hashtable - Save 100.00 as Drown_int of 2 in HASH_Drowning
Set Drown_int = (Drown_int + 1)
Drowndecvalue
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Do Multiple ActionsFor each (Integer Drown_temp) from 1 to Drown_int, do (Actions)
Loop - Actions
Set Drown_temp_point_A = (Position of (Load Drown_temp of 1 in HASH_Drowning))
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Load Drown_temp of 1 in HASH_Drowning) is alive) Equal to (==) True
(Terrain pathing at Drown_temp_point_A of type Peon Harvest Pathing is off) Equal to (==) True
Then - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load Drown_temp of 2 from HASH_Drowning) Greater than or equal to (>=) 1.00
Then - Actions
-------- Change the conditions above in which the unit will lose its custom value. The best, would be to add a special terrain in the sea and set the conditions so that it will lose breath in the selected tile --------
Set Drown_leak_dest_bool = True
-------- Add in the if/then/else statement bellow some exceptions if you wan't using if/then/else so that the breathe is longer shorter for every unit. E.g. if the unit is naga, breathe might decrease in a smaller rate than a human, or night elf etc. --------
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Load Drown_int of 1 in HASH_Drowning)) Equal to (==) Naga Myrmidon
Then - Actions
Set Drown_rate = 0.20
Else - Actions
Set Drown_rate = 0.50
Hashtable - Save ((Load Drown_temp of 2 from HASH_Drowning) - Drown_rate) as Drown_temp of 2 in HASH_Drowning
Set Drown_tempstring = |C004444AA
-------- Feel free to change the color that indicates the how much breath the unit has (also can change size etc. By default i set it to light blue for remaining breath and white for the used breath --------
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load Drown_temp of 2 from HASH_Drowning) Greater than (>) 1.00
Then - Actions
Do Multiple ActionsFor each (Integer Not_integer_A) from 1 to (Integer((Load Drown_temp of 2 from HASH_Drowning))), do (Actions)
Loop - Actions
Set Drown_tempstring = (Drown_tempstring + l)
Set Drown_tempstring = (Drown_tempstring + |C00888888)
Do Multiple ActionsFor each (Integer Not_integer_A) from (Integer((Load Drown_temp of 2 from HASH_Drowning))) to 100, do (Actions)
Loop - Actions
Set Drown_tempstring = (Drown_tempstring + l)
Floating Text - Create floating text that reads Drown_tempstring at Drown_temp_point_A with Z offset 200.00, using font size 3.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 0.12 seconds
Set Drown_tempstring = <Empty String>
Else - Actions
Else - Actions
-------- You might wanna change this cause they die too damn fast (in 2.5 seconds actually) --------
Unit - Cause (Load Drown_temp of 1 in HASH_Drowning) to damage (Load Drown_temp of 1 in HASH_Drowning), dealing ((Max life of (Load Drown_temp of 1 in HASH_Drowning)) / 25.00) damage of attack type Chaos and damage type Slow Poison
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load Drown_temp of 2 from HASH_Drowning) Less than (<) 100.00
Then - Actions
Set Drown_leak_dest_bool = True
-------- This will increase the units breath in time --------
Hashtable - Save ((Load Drown_temp of 2 from HASH_Drowning) + 2.00) as Drown_temp of 2 in HASH_Drowning
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Load Drown_temp of 1 in HASH_Drowning) is alive) Equal to (==) True
Then - Actions
Do Multiple ActionsFor each (Integer Not_integer_A) from 1 to (Integer((Load Drown_temp of 2 from HASH_Drowning))), do (Actions)
Loop - Actions
Set Drown_tempstring = (Drown_tempstring + l)
Set Drown_tempstring = (Drown_tempstring + |C00888888)
Do Multiple ActionsFor each (Integer Not_integer_A) from (Integer((Load Drown_temp of 2 from HASH_Drowning))) to 100, do (Actions)
Loop - Actions
Set Drown_tempstring = (Drown_tempstring + l)
Floating Text - Create floating text that reads Drown_tempstring at Drown_temp_point_A with Z offset 200.00, using font size 3.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 0.12 seconds
Integers don't leak, but Integers A and B could bug, so they shouldn't be used, but the random global variable should be declared and used.
And as I understood you didn't create any "special swiming system" to let every unit swim. Then answer one question please... Why should the units with gills lost air over time under water? The units with it CAN breath under it.
System is useless since that. And non-realistic. And even if it would be so - noone will use it, cause... where?! Just Naga RPG? ;D Makes no sense...
And also there is a strange thing with "other" units entering water, instead of entering low water, they sometimes are stunned just near it and need another one command to continue their path, but sometimes they just run in strange direction trying to find the way to get here not buy direct entering the water, but moving somwhere else...
Not a bad idea for a system but I have some issues.
For me none of the floating text's showed.
You leak six times every second which will add up to be alot over the course of a game. (Terrain pathing at (Position of (Load Drown_temp of 1 in HASH_Drowning)) of type Peon Harvest Pathing is off) Equal to True is what leaks.
Let's say the water is hydrabarium, and only naga can swim on it but still the misterious molecules, don't let anything else swim on it (or just vanish the air that is above)
Also with the new edition i fixed the leaks you pointed out
EDIT:Also added some ither stuff (read changelog im too lame to write it here)
Dont work for me either. Also heavy lagg with many units on water. Thats why i gave rating 2/5..
Improve system or the people here on the hive will trash it.
Well... works perfect for me. But Nagas still lost "breath" under water, lawl
Nevermind, that's your idea, leave it as it is, you'd better fix the problem with this guys.
Can computers even run games without a graphics card..?
Anyways...
In your init trigger, remove the 900 second message display and place it in a demo trigger. I don't think people want that message being displayed once they copy your triggers over.
Also I'm still not seeing the floating text (check the attachment). It may be fixed by re-using a floating text instead of dynamically creating them and destroying them. Just use the Floating Text - Change text feature and store the floating text inside the hashtable or something.
Well the only i can say is this:
Try to open it with map editor (i created it with JNGP UMSWE enabled) and save it and run it. Not by testing the map, but in Single player.(dnt press test map, instead save and open wc3 adn run it)
Well the only i can say is this:
Try to open it with map editor (i created it with JNGP UMSWE enabled) and save it and run it. Not by testing the map, but in Single player.(dnt press test map, instead save and open wc3 adn run it)
Well i can't try ur suggestion right now (various reasons) but the problem is the floating bars. When we fix that, then we can talk about less lag-more efficiency. I wanted it to be created so anyway so when you exit water, you breath increases
Well i can't try ur suggestion right now (various reasons) but the problem is the floating bars. When we fix that, then we can talk about less lag-more efficiency. I wanted it to be created so anyway so when you exit water, you breath increases
Man i may sound nazistis or sthing, but i wanted the system to be this way.
Now i can think of a reason
See this Set Drown_tempstring = (Drown_tempstring + |C00888888)
the collor code especially the first part (00), might cause invisible script (i wont say where i found it)
try make it ff and tell me if helped... else you can add some breakpoint to see if this part is running anyway like Display all players a text inside it.
Anyway im fully convinced that the GUI hasnt any error, cause it works for me and for Aspard thus something else is the problem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.