set a useHeld time

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

set a useHeld time

Post 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
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

How about

local.time = 0

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

if(local.time > 5 )

etc etc
Image
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

Finally i changed my mind and tried something else ;) Thx bdbodger.I will certainly use it later.
Post Reply