Game Development Community

Script problem

by Nathan Cox · in Torque Game Engine · 09/04/2007 (11:00 am) · 2 replies

I have been using torquescript tutorials and am quite getting to grips wiv the language. A few things havent been told to me in exact words though and i need to know the commands for them. Here they are:

-How do you make the player press a key?
-How do i make the player control an object?
-How do i make the player react to certain things said on the HUD (e.g someone says my name and i instantly reply: "yes?")

I need these cleared up and fast. My game will be good wen published!

#1
09/04/2007 (4:07 pm)
Have a look at my elevator script www.colab-aktiv.com/strangeDays/misc/freeStuff/index.htm#elevator

I've bound the 'u' key (use) to a function that determines what object you're currently looking at and then calls the onInteract method of that object.

This allows the player to press the elevator button and select what floor they want to go to.
#2
09/05/2007 (5:25 am)
Thats not what i want. I know how to BIND a key. I want to force the player to press a button. (its something like pushDialog or something ^^)

EDIT: I also need to create a delay between different commands.