PDA

View Full Version : Get user input



Arightwizard
September 19th, 2009, 05:24 PM
Wow it seems like I'm spamming you people with questions.

I would like to ask if anyone knows how to detect user input through the console?
Like, they press ~, they type, "tele 1", it detects the command 'tele 1' and teleports them to a specified area?
I'm not asking how to teleport, if you know that then great - but I'm just asking how to detect a command.
Sorry for the question-spamming, and thanks,
-Arightwizard

chrisk123999
September 19th, 2009, 05:35 PM
Sapp and Devicator has commands for teleporting players.

Also, you could use dev-mode to object_teleport the player to flags.


object_teleport (unit (list_get (players) 0 ) ) flag_name

Limited
September 19th, 2009, 06:09 PM
Sapp and Devicator has commands for teleporting players.

Also, you could use dev-mode to object_teleport the player to flags.


object_teleport (unit (list_get (players) 0 ) ) flag_name

I'm not asking how to teleport
Are you coding something, or is this via Halo scripting? Perhaps your using OS?

Skyline
September 19th, 2009, 06:34 PM
Hmm, misunderstood. You can create a script and use the 'wake' command to initialize it.

chrisk123999
September 19th, 2009, 06:39 PM
Looked like he was asking how to teleport.
He said he wanted it done via console, so I gave him the way to do it via console.

Arightwizard
September 19th, 2009, 07:12 PM
@Limited:
This is using halo scripting .hsc

@Chrisk:
I'm not asking how to teleport with the console. I'm asking how to use hsc to detect what the player enters into the console, and so I can add custom console commands...Something like


(sleep_until (= (console.command) "tele 1"))
; some code here to do whatever the heck I want
But I don't know what to do with 'console.command'

Dwood
September 19th, 2009, 07:16 PM
You can't. Do what Skyline suggested.

Arightwizard
September 19th, 2009, 07:33 PM
You can't. Do what Skyline suggested.
Jeeeeez don't be so pushy :P. Thanks, skyline.
One problem though:
How do I create a sleeping script?
Is it like,

(script sleeping a
or something else?

UnevenElefant5
September 19th, 2009, 09:01 PM
It's (script dormant SCRIPT NAME I believe