Announcement
Collapse
No announcement yet.
Adding delay
Collapse
X
-
RattleSN4K3 repliedYou can add a delay by using a Timer.
Code:exec function CallHim() { `log("Open map after calling"); ClientMessage("Call him!"); SetTimer(2.0, false, 'CallHimTimer'); } simulated function CallHimTimer() { ConsoleCommand("open mymap1"); }
Leave a comment:
-
Tetsuya started a topic Adding delayAdding delay
I have this function in my PlayerController class. All I want to do is to add a delay for 2 seconds so when I click a button and the function is called, I want to display the message (Call him) and after 2 seconds I want to change the map. Right now, the map is changing immediatelly and I can't read the message (only on editor since on editor, the map doesn't change).
So how can I display the message and after 2 seconds, the map will change?
Code:exec function CallHim() { `log("Open map after calling"); ClientMessage("Call him!"); ConsoleCommand("open mymap1"); }
Tags: None
Leave a comment: