hi guys..i just done a half of this tutorial and i need some help..explain me please how i make this lines
->Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
hi guys..i just done a half of this tutorial and i need some help..explain me please how i make this lines
->Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
The first one is a Player comparison (you can also use (Triggering player) Equal to Neutral Hostile) and the second one is an Integer comparison -> Unit - Custom value of unit.
But what if 2 or more units dies at the same time will this trigger work?
it works well... dont just comment... read the other comments & posts b4 making ur own.... i even have an example made in the previous posts to help ppl who are clueless.... although all credits goes back to the creator.
i know how to make one myself but im too lazy and i still have lots of others things to do like MUI spells...
also i searched the spells section and couldn't find anything...
so can you post the map? pretty pls?
EDIT:
nvm i made one up really quick...also you leak a point when you create a unit...
and i heard that using custom values of units is not good because if another system uses them too then it will bug...
to clear the point leak when you create the unit you should save X & Y and then load it using hastables...
see the creep respawn i made to get a clearer idea...
Creep Respawn System using Hashtables
CR Map Initialization
Events
Map initialization
Conditions Actions
Hashtable - Create a hashtable Set CreepRespawn_Hashtable = (Last created hashtable) Custom script: set bj_wantDestroyGroup = true Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
Loop - Actions
Set CreepRespawn_Point = (Position of (Picked unit)) Hashtable - Save 8.00 as (Key Time) of (Key (Picked unit)) in CreepRespawn_Hashtable Hashtable - Save (X of CreepRespawn_Point) as 1 of (Key (Picked unit)) in CreepRespawn_Hashtable Hashtable - Save (Y of CreepRespawn_Point) as 2 of (Key (Picked unit)) in CreepRespawn_Hashtable Custom script: call RemoveLocation(udg_CreepRespawn_Point)
CR Enter Map
Events
Unit - A unit enters (Playable map area)
Conditions Actions
Set CreepRespawn_Point = (Position of (Triggering unit)) Hashtable - Save 8.00 as (Key Time) of (Key (Triggering unit)) in CreepRespawn_Hashtable Hashtable - Save (X of CreepRespawn_Point) as 1 of (Key (Triggering unit)) in CreepRespawn_Hashtable Hashtable - Save (Y of CreepRespawn_Point) as 2 of (Key (Triggering unit)) in CreepRespawn_Hashtable Custom script: call RemoveLocation(udg_CreepRespawn_Point)
CR Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
Actions
Wait (Load (Key Time) of (Key (Triggering unit)) from CreepRespawn_Hashtable) seconds Set CreepRespawn_Point = (Point((Load 1 of (Key (Triggering unit)) from CreepRespawn_Hashtable), (Load 2 of (Key (Triggering unit)) from CreepRespawn_Hashtable))) Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at CreepRespawn_Point facing Default building facing degrees Custom script: call RemoveLocation(udg_CreepRespawn_Point)
Quote:
at the least try understand how long it takes for the creator to come up with a decent leakless trigger.......
really? how long can it take? i did that creep respawn in less than 10 mins...
"How can i get the '(Temp_Integer +1)' part? I can't find that!!"
it is a custom trigger. u need to make it on ur own. press ctrl + B n u will see a new window. press edit variables, add new variables.
now label ur variable as wad u like, for this instance: Temp_Integer [this will be ur label/name of the variable u will create] now select the type of variable it belongs to, for temp_integer <--- this already tells u it is an integer, so select integer variable.
now create a new action, select set new variable options.
change the set new variable to the one u created.
u will have:
Set Temp_Integer = (something like this)
change the (something like this) to arithmetic n select ur Temp_Integer + 1
and u will have this
Set Temp_Integer = (select arithmetic from function)
then you need to change the function value of the arithmetic to Temp_Integer + 1.