Hi Pinzu
#1 What do you mean by fountain restore both HP and Mana ? You mean it gives players HP and Mana ? Or it has HP and Mana itself ?
If it restores for units HP and Mana , you should give it two abilities, 'Health Points Regeneration' and 'Mana Points Regeneration' in 'Unit Abilities' in Object editor, u must find it the first one probably, if not , check if the fountain is an Unit first and has abilities, If you want it to be Invulnerable, check (Is Invulnerable) otherwise let it as it is so it's like dota's fountains.
If you want to give it Mana , just change max Mana points, and max health, when the mana max is 0 , it has no mana.
2# You mean like footmen ? Spawn near a building ? Or being trained ? Between each period and other ? Or before upgrading a building?
Anyways if you want it to spawn near building, just start a timer in the beginning o the map ( Elapsed Time is 0.00 sec for example ), when it ends make another trigger with event ' When Countdown timer ends ' or something like that, add actions , if you want it to spawn only when the building exists, make 'if/then/else' trigger, condition is boolean , if the building is alive, or in region, then the action is : (Create 'Footman' at (Your building offset by 100 towards 90 degrees )... Remember this trigger leaks , you must set a point variable for example pointSpawn = Your building point offset by 100 towards 90 degrees, after the 'create unit' trigger , remove the created variable (
-
Custom script : call RemoveLocation(udg_pointSpawn)
)
If you want to train the unit inside building, change 'create unit' trigger with 'Make Building train 'Footman' trigger, you must find it there in the editor for sure.
3# Hmm, you remember previous trigger ? After 'Create footman at pointSpawn' trigger , create a variable called (SpawnedUnit = (LastCreatedUnit), maybe you will need this variable, then create after it another trigger which is :
-
Unit - Issue Order to attack/move to (Your Point)
4# Absolutely easy, you should start a countdown timer after the hero dies, and when the countdown timer ends , you revive the hero in your specified point, this thing needs two triggers, here are they :
-
Events :
-
Unit - A Unit dies
-
Conditions :
-
((Dying Unit) belongs to player 1) ===> For example
-
((Dying Unit) is a hero equal to True) <=== This is important
-
Actions :
-
Set ReviveHero = (Dying unit)
-
Countdown timer - Start a countdown timer with One shot timer that ends in 30 seconds
-
Set ReviveTimer = (Last created Countdown timer )
-
Events :
-
Time - ReviveTimer ends
-
Conditions :
-
Actions :
-
Hero - Revive 'ReviveHero' at (Your point)
-
Countdown timer - Destroy ReviveTimer
-
ReviveTimer = No timer
The previous trigger is SUI , not MUI also
I may create for you a Multiplayer and Multiunit trigger...
NOTE : All the previous triggers leak , because Points ( Locations ) always leak , you must always destroy ( Remove ) a point after creating it, and that is done by creating a variable , using it , then removing it, Leaks may cause lags when the hero respawns or has an issue order ...Etc
NOTE 2 : You may also want to create a countdown timer , just add this trigger after creating the timer :
-
Countdown timer - Create Windows Timer for ReviveTimer
-
ReviveTimerWindow = (Last created Timer)
And then destroy it in the second trigger
-
Countdown timer - Destroy (Remove) ReviveTimerTimerWindow countdown timer window ( Or something like this )
I wish these all help you
And sorry for my terrible English
.