Bribes solution is more efficient (as always ;) ), but I am also sometimes using extended local variables just for sake of lucidity.
Maybe change your
integer check
to
boolean check
and then just
if check then
// command block
else
// andother one here
endif
Or if you want to use multiple check...
Attach a triggeraction and triggercondition to your trigger and trigger itself to unit. When unit dies, simpy use
function removeTrigger takes trigger trig returns nothing
call DisableTrigger(trig)
call TriggerRemoveAction(trig, GetHandleTriggerAction(trig, "trig_action"))
call...
Hmm, maybe because procesor saves data which won't be needed in a near future from RAM to disk space. It's called "content switch".
Thanks to virtual memory, process can adress far more than RAM space (the process believes he owns whole disk space and he is only process in whole system)...
If you want to check diferent unit types:
function nullFilter takes nothing returns boolean
return true
endfunction
function IsUnitTypeInRangeOfUnit takes unit u, unittype ut, real radius returns boolean
local group g = CreateGroup()
// you can also used some global group...
Sure, I know that pointed object is still the same, but let's say I create 3 pointers in 3 diferent functions.
P1----> Object <----P2
P3----^
Each of this 3 pointers uses one memory cell where is stored the adress of pointed object.
--------------
| ObjectData | - ObjectAdress...
function B takes nothing returns nothing
local player pl2 = GetHandlePlayer(GetExpiredTimer(), "pl1")
call DoSomethingWithPlayer(pl2)
endfunction
function A takes nothing returns nothing
local player pl1 = GetTriggerPlayer()
call SetHandlePlayer(exampleTimer, "pl1"...
How do you know that? I thought every variable (except integer, real, string and boolean) should be nulled. I am asking because I'm also using
local trigger trig = CreateTrigger()
...Register
...AddAction
set trig = null
Man, Im not going to watch some low quality blurred video and try to reconstructe your problem. Attach or save somewhere your map. I will download it and check your problems.
AFAIK you want
1) builder with the ability, which will make a simple tree (or buch of trees??) at target point
2) if...
You can make triggers in GUI (Graphic User Interface)
Events
Unit - A unit Dies
Conditions
(Unit-Type of (Triggering Unit)) Equal to (==) Footman
Actions
Player - Set (Owner of (Triggering Unit)) Current gold to 0
or convert it to JASS, which is some kind of programming language...
With a little bit of experimenting, I found:
Avatar
Defend
Berserk
Wind Walk
Immolation
Divine Shield
Mana Shield
Which are not interrupting my hero when used.
Do you know any more or is there any option wher could I set this behavior?
You can find it under:
Conditions -> Integer Comparison - > Player - Property -> and then set the options as you can see above.
And to your tree problem: Since this is JASS Help forum thread, I tought you are working in JASS. With GUI, I could help you, but please...explain once more, what you...
I also have a question.
struct S
timer t
static method create takes integer int returns S
local S s = S.allocate()
set s.t = CreateTimer()
call SetHandleInt(s.t, "int", int)
return s
endmethod
endstruct
function test takes nothing...
Hmm, this is realy weird.
I tried an example from jassHelper manual:
struct Parent
stub method xx takes nothing returns nothing
call BJDebugMsg("Parent")
endmethod
method doSomething takes nothing returns nothing
call this.xx()
call this.xx()...