Page 1 of 1

set a useHeld time

Posted: Thu Nov 25, 2004 11:32 pm
by agentmad007
Hi ,

i would like to know how to set a useheld time for my statement

Code: Select all

	if ( (local.player.useheld == 1) )
i would to say if the player useheld for 5 seconds then ....bla bla

my script above say only if the player useheld .

Thank you

Posted: Fri Nov 26, 2004 1:33 am
by bdbodger
How about

local.time = 0

while(local.player.useheld == 1)
{
wait 1
local.time++
}

if(local.time > 5 )

etc etc

Posted: Fri Nov 26, 2004 1:50 am
by agentmad007
Finally i changed my mind and tried something else ;) Thx bdbodger.I will certainly use it later.