IPB


Welcome Guest ( Log In | Register )

 Forum Rules Forum Rules
 
Reply to this topicStart new topic
> addeventhandler and sleep
onde
post Aug 8 2009, 23:45
Post #1


New Member
*

Group: Members
Posts: 4
Joined: 9-July 09
Member No.: 6,147



Hello,

An idea why it don't sleep ?

CODE
this addeventhandler ["killed", {sleep 10; hint "killed"}];
 
Quote Post
D@V£
post Aug 9 2009, 01:47
Post #2


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



I think you might need to change that semicolon to a comma, try this instead:
CODE
this addeventhandler ["killed", {sleep 10, hint "killed"}];


However, IIRC the commands will be put through simultaneously, so you'll probably have to use a script if you want a time delay.

This post has been edited by D@V£: Aug 9 2009, 01:48


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post
onde
post Aug 9 2009, 02:21
Post #3


New Member
*

Group: Members
Posts: 4
Joined: 9-July 09
Member No.: 6,147



ok, thanks but its same, I will try with a script ...
 
Quote Post
D@V£
post Aug 9 2009, 14:15
Post #4


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



I'd suggest using SQS syntax for something this simple, it might be depreciated and such, but setting up simple time delays in SQF syntax is... well... a pain in the arse. (You have to use the execVM function and name your script and all other sorts of weirdness...)


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post

Fast ReplyReply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 25th April 2024 - 00:39