getProjectileCounter
Client-side
Server-side
Shared
Pair: setProjectileCounter
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
Get the time left before a projectile detonates.
OOP Syntax Help! I don't understand this!
- Method:projectile:getCounter(...)
- Variable: .counter
Syntax
int getProjectileCounter ( projectile projectile )Required Arguments
- projectile: the projectile to get the timer of.
Returns
- int: value
Returns the the time in milliseconds to detonation which depending on the projectile type will do different things:
Code Examples
shared
With this example you can find out how long does it take for a projectile to explode/end
function getProjectileBoomTime()outputChatBox("Time for "..getProjectileType(source).." to explode/end is "..getProjectileCounter(source).." miliseconds.",255,0,0)endaddEventHandler("onClientProjectileCreation",root,getProjectileBoomTime)