Ill go straight to the point. Atm when i select a hero (press on it) the hero will be removed and recreated to another place to that player.. i wana make it so when i double click on hero with will be removed and recreated for that player so peeps could see heroes stats before they select them
Actions: set "LittleBrat" = "LittleBrat" + 1 If "LittleBrat"= 2 then Do what you want, else dont do anything...
that inefficiently requires too many variables for such a simple task
this on the otherhand, works fine
Event: unit selected
Actions:
If (triggering unit) != var_unitSelect[pnum of trig player] then
set var_unitSelected[pnum of trig player] = (triggering unit)
else
//SELECT UNIT FOR PLAYER
Your triggers have one weakness in common. If you select hero A ( A=1 ), then select hero B ( B=1 ), and the, just to review the stats reselect hero A ( A=2 ) you would alread have "doubleclicked" on that unit even thought you haven't.
My idea: Event: OnSelect Action: Set CustomValue(SelectedUnit) = CustomValue(SelectedUnit) + 1 If CustomValue(SelectedUnit) >= 2 <create it somehow>
Event: Every X seconds of game Action: selectEveryUnit ( units in <selection Area> ) and do set CustomValue(pickeUnit) = 0
This way you can customize your "doubleClick-Speed" via setting "X" and you can get shure tht it is truly doubleClicked
but i think not even that trigger works, because it triggers on "select" not on "Click" and you aren't selecting a unit twice only clicking on it twise...
Omg people, please. This is the system currently in place in the map im making right now. What it does is there is a unit group variable, array 1-14. When a player selects a hero Selected[player number of triggering player] has the clicked unit added to it. That way if you click a unit and its in the group already it is given to you. Also when doing this it empties the variable before the new unit is added
Lord RaszulYour triggers have one weakness in common. If you select hero A ( A=1 ), then select hero B ( B=1 ), and the, just to review the stats reselect hero A ( A=2 ) you would alread have "doubleclicked" on that unit even thought you haven't.
Lord Raszul, did you even read my trigger? it will not think that because it does no incrementing
Chuckle BrotherOmg people, please. This is the system currently in place in the map im making right now. What it does is there is a unit group variable, array 1-14. When a player selects a hero Selected[player number of triggering player] has the clicked unit added to it. That way if you click a unit and its in the group already it is given to you. Also when doing this it empties the variable before the new unit is added
ie what i said, only using a unit-group variable is needless as you simply have to hold 1 unit... i'll restate it since reading appears to be in shortness
Event: unit selected
Actions:
If ( (triggering unit) != var_unitSelect[pnum of trig player] ) then
set var_unitSelected[pnum of trig player] = (triggering unit)
else
//SELECT UNIT FOR PLAYER
ie what i said, only using a unit-group variable is needless as you simply have to hold 1 unit... i'll restate it since reading appears to be in shortness
Sorry, I didn't read yours, I just saw the other one nd it ws somewhat stupid. But yeah I guess you dont need it to be a unit groupd, I just do because I like unit groups over unit variables
imported_Bort
#11
Try this one
Event: A player selects a unit Conditions: Triggering unit is in HeroSelectregion Actions: If Triggering Unit is equal to SelectUnit[Player number of triggering play] Then Create 1 Unit-type of triggering unit for triggering player at HeroCreateRegion Else Set SelectUnit[Player number of Triggering Player] = Triggering Unit
it might be selected unit instead of triggering unit... but it should all work