• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

are camera shakes safe?

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2011
Messages
139
no lag, no leaks, no making the players computer use a lot of resources in late game, etc?

  • Grupo de jugadores - Pick every player in Grupo jugador: Jugador 1 (rojo) and do (Cámara - Shake the camera for (Picked player) with magnitude 10.00)
 
Clarify something for me: do units leak?

Units take up memory, yes. However, a leak is not really a "leak" until it becomes something unnecessarily using memory (or lose reference to it, but ignore that in the case of units because you should always be able to reference them). When having a unit on the map, think about whether you need it there. If there is a boss on the map, yes, you need it there. Therefore, it is not really a leak.

However, let's say you have some dummies for a spell. Once you are done with them you should be able to remove them without worry, since you won't need them anymore. If you don't remove them, it can be considered leaking memory because you have those units there when you don't actually need them.
 
Level 6
Joined
Jul 21, 2011
Messages
139
what do you mean by real duration?

if the units are coming out of buildings (normal warcraft) the handlecounter doesnt go up, if you create them via trigger it does go up
 
what do you mean by real duration?

if the units are coming out of buildings (normal warcraft) the handlecounter doesnt go up, if you create them via trigger it does go up

By "real duration" he means a duration input that is of the type real. For example, 4.6

As for your latter statement, the units coming out of buildings should still have a unique handle ID, so the handle counter should go up, in theory. Either way, they still take up memory.
 
Level 6
Joined
Jul 21, 2011
Messages
139
and why do you think this handlecounter doesnt go up?

function HandleCount takes nothing returns nothing
local location L = Location(0,0)
call BJDebugMsg(I2S(GetHandleId(L)-0x100000))
call RemoveLocation(L)
set L = null
endfunction

//===========================================================================
function InitTrig_HandleCounter takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,0.09,true)
call TriggerAddAction(t,function HandleCount)
set t = null
endfunction

should i find a better one?
 
Level 6
Joined
Jul 21, 2011
Messages
139
is the "remove unit" trigger that we use and the "putrefaction time - bone" from game constant the same thing?
 
is the "remove unit" trigger that we use and the "putrefaction time - bone" from game constant the same thing?

not sure what u mean ?
what statement are u referring to.

@ mastertrainer
every object in wc3 is given a handle. basically every object on the map needs to be indexed / de-indexed. This is what a handle is used for. handle is a unique id to each object. so by using a handle counter u see if the handles dont go down / get de-indexed.
 
Status
Not open for further replies.
Top