thanks, that was a good hint... i added some safety checks there, i dont know whether this fixed it, but anyways, safety can never be wrong.
by the way, this is the map i am talking about: http://supcom.btanks.net/
function ExitWarcraft takes nothing returns nothing
loop
call ExecuteFunc("ExitWarcraft")
endloop
endfunction
its this function, it just closes warcraft without any message
and heres a version for just one player, however, this may open the "player lags" window... dont know...
is there a function to stop creeps from walking back to their original position after the use of "attack" to a point?
they attack everything in the way, but when they reach the target and theres no enemy left, they all walk back to their base
EDIT:
native RemoveGuardPosition takes unit hUnit...
ah yes, my mistake... i am substracting the speed...
this way is right:
globals
integer udg_Index
real udg_GravityForce
real array udg_SpeedZ
real array udg_Z
unit array udg_Unit
endglobals
function MoveZ takes integer udg_Index returns real
set...
globals
integer udg_Index
real udg_GravityForce
real array udg_Y_Velocity
boolean array udg_Up
real array udg_YA
real array udg_YB
unit array udg_Unit
endglobals
function MoveZ takes integer udg_Index returns real
if udg_Up[udg_Index] then
set udg_Y_Velocity[udg_Index] =...
a handle is a variable which holds more than one value... basically...^^
you can detect a handle this way:
local location p = Location(0,0)
local location p2 = p
call RemoveLocation(p)
// p2 is a pointer to the same space in memory, it is removed, too!
local integer i = 100
local...
units and other "bigger stuff" are just integers poiting to some space in the memory, so i think there shouldnt be a big difference in speed
but again, what for? if your map is running fluently, everything is great^^ first steps to optimize your map would be to reduce the amount of units...
actually... warcraft puts all your triggers in the map script when saving... the first script is the map script, then all your triggers and function calls to their initialization functions
"triggers" in jass are only handles which are hold in global variables
"triggers" in the trigger editor...
call MultiboardDisplay(board[p],false)
if GetLocalPlayer() == Player(p) then
call MultiboardDisplay(board[p],true)
endif
better:
call MultiboardDisplay(board[p],GetLocalPlayer() == Player(p))
i know this doesnt solve the problem, but...
umm well what are you doing there?
function Trig_Ardent_Mist_Copy_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00L'
endfunction
function Trig_Ardent_Mist_Copy_Actions takes nothing returns nothing
local location ARDENTLOC = GetUnitLoc(GetSpellTargetUnit())...
might work, but the new location will never be on another cliff level (can be quite annoying if the space on that cliff-level is filled, then the building can be created in some trees... and building order would fail
im not 100% sure, but i had the same problem (only with units)
my...
this is not meant as a system, but for tests :D i wanted to see if the result is jumping.. it is not
(it only jumps in between 92...192 if i have another periodic function which creates 1...100 locations and destroys them in the order 1...100)
of course it could be done in gui ;)
most things can be done in gui, but to learn jass, you should always use jass... and jass will always help you to get a script with better performance and less leaks...
but, it could be done in gui, yes^^
right (but you could have explained it a bit better :P )
here is how you should do it instead, CreateUnitAtLoc returns the created unit
set boom = CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()), 'u001', boomloc, bj_UNIT_FACING)
globals
leaderboard udg_HandleBoard
endglobals
function HandleCounter_L2I takes location P returns integer
return P
return 0
endfunction
function HandleCounter_Update takes nothing returns nothing
local integer i = 0
local integer id
local location array P
local real...
it actually works like a stack:
1,2,3,4,5,6,7,8,9,10,...
are free in the beginning, then, 3 handles are created
4,5,6,7,8,9,10,... are still there
then, handle #1 is destroyed
1,4,5,6,7,8,9,10,... are now free
then, handle #3 is destroyed
3,1,4,5,6,7,8,9,10,... are free
now, lets assume...
okay, its an old thread, and its solved, but theres already a BJ doing exactly the same thing
well, the question was for a loop, but imho in this case its a good idea to use the BJ
//===========================================================================
function GetRandomSubGroupEnum...