mems
Memory Lapse
- Reaction score
- 24
Question 1:
----------------------------------------
i have a function:
and im calling it there:
Simply this supposed to be a true usage according to edit-->Convert to Custom tex. Only thingthat i did is making DemageUnits() take variables instead of using Global(udg) variables. and i call them with sending them local variables when i need them. BUT when im trying to save the trigger it gives error and says:
Expected '
I have tryed to check the whole trigger and functions 1 by 1 on a syntax checker and it says there is a pharse error on line:
call ForGroupBJ( GetUnitsInRectAll(RectFromCenterSizeBJ(GetUnitLoc(Target), 200.00, 200.00)), function DemageUnits(Target, Caster) )
at or near ( and )
simply its becouse of "DemageUnits(Target, Caster)"
This function ForGroupBJ() is picking all units around 200x200 Target and does DemageUnits function
In DemageUnits function is moves picked unit away from Target and Deals 50 Demage from Caster to picked unit.
i could not find what am i doing wrong anyone help me?
Question 2:
------------------------------------------------------------
I made a spell that moves the targeted unit away from casting unit, likes pushing units away from you.
I made the spell with triggers that works really fine for me but have to use 2 triggers for this spell and i wanted to do it in 1 trigger to enable the local variables. Couse with out them spell will be useless.
Simply i used an initially off trigger which runs every 0.03 gametime seconds and continue running untill i turn off it on main spell trigger which makes the unit slide.
But when i try to do it in 1 trigger in a loop i get a bad effect couse
wait(0.01) is takes too much also waiting in game time with same value does not has a differnt effect and unit warps from 1 point to another slow like hell which makes the spell nothing. Here is what have i tried with triggers:
but if i use the single line (unit move) in another trigger on events every 0.03 gametime it slides the unit perfectly fast
My question is is there a way to have a fast loop with jass. I have an idea but i dont know how to do it if anyone can help;
I will make the (move line) a function(it also includes loads of other actions) and will create a timer and try to mix it with one shot timer something like:
call Timer(Timer, 0.03, true MoveFunction(Parameters))
Becouse of the other problem that i asked above i could not use that style or test it too also i dont know how to use the timer functions in Jass nor in Triggers alot i need an urgent help please
Ps: yes I have readed the Jass Manual site
Ps: I dont use WEU Please don't tell me about slide function also i want my spell can be opened edited and used by everyone else so i will not dl WEU
----------------------------------------
i have a function:
Code:
function DemageUnits takes unit Tar, unit Cast returns nothing
call UnitDamageTargetBJ( Cast, GetEnumUnit(), 50.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL )
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(Tar), 200.00, AngleBetweenPoints(GetUnitLoc(Tar), GetUnitLoc(GetEnumUnit()))) )
endfunction
and im calling it there:
Code:
call ForGroupBJ( GetUnitsInRectAll(RectFromCenterSizeBJ(GetUnitLoc(Target), 200.00, 200.00)), function DemageUnits(Target, Caster) )
Simply this supposed to be a true usage according to edit-->Convert to Custom tex. Only thingthat i did is making DemageUnits() take variables instead of using Global(udg) variables. and i call them with sending them local variables when i need them. BUT when im trying to save the trigger it gives error and says:
Expected '
I have tryed to check the whole trigger and functions 1 by 1 on a syntax checker and it says there is a pharse error on line:
call ForGroupBJ( GetUnitsInRectAll(RectFromCenterSizeBJ(GetUnitLoc(Target), 200.00, 200.00)), function DemageUnits(Target, Caster) )
at or near ( and )
simply its becouse of "DemageUnits(Target, Caster)"
This function ForGroupBJ() is picking all units around 200x200 Target and does DemageUnits function
In DemageUnits function is moves picked unit away from Target and Deals 50 Demage from Caster to picked unit.
i could not find what am i doing wrong anyone help me?
Question 2:
------------------------------------------------------------
I made a spell that moves the targeted unit away from casting unit, likes pushing units away from you.
I made the spell with triggers that works really fine for me but have to use 2 triggers for this spell and i wanted to do it in 1 trigger to enable the local variables. Couse with out them spell will be useless.
Simply i used an initially off trigger which runs every 0.03 gametime seconds and continue running untill i turn off it on main spell trigger which makes the unit slide.
But when i try to do it in 1 trigger in a loop i get a bad effect couse
wait(0.01) is takes too much also waiting in game time with same value does not has a differnt effect and unit warps from 1 point to another slow like hell which makes the spell nothing. Here is what have i tried with triggers:
Code:
For each (Integer A) from 1 to 30, do (Actions)
Loop - Actions
Unit - Move target instantly to ((Position of target) offset by 20.00 towards angel degrees), facing point
Wait 0.01 seconds
but if i use the single line (unit move) in another trigger on events every 0.03 gametime it slides the unit perfectly fast
My question is is there a way to have a fast loop with jass. I have an idea but i dont know how to do it if anyone can help;
I will make the (move line) a function(it also includes loads of other actions) and will create a timer and try to mix it with one shot timer something like:
call Timer(Timer, 0.03, true MoveFunction(Parameters))
Becouse of the other problem that i asked above i could not use that style or test it too also i dont know how to use the timer functions in Jass nor in Triggers alot i need an urgent help please
Ps: yes I have readed the Jass Manual site
Ps: I dont use WEU Please don't tell me about slide function also i want my spell can be opened edited and used by everyone else so i will not dl WEU