3 questions

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
creekmonkey
Posts: 116
Joined: Tue Oct 23, 2007 2:55 pm

3 questions

Post by creekmonkey »

1. Are keyboard commands ( ie: IsKeyDown or self.key_pressed ) only possible in LowLevel ?
2. Is it possible to patrol form point to point in LowLevel?
3. Is it possible in either HL or LL to control the speed of a patroling pawn with the keyboard.
User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Re: 3 questions

Post by Graywolf »

1. Are keyboard commands ( ie: IsKeyDown or self.key_pressed ) only possible in LowLevel ?
Yes, but actually, no. The trick, is to use another pawn, that is in LowLevel. Add a dummy projectile pawn(no render, no collision), and set it's szEntityName to, say, "keyboard". Now, in your pawn that's running HighLevel, you can do this:

Code: Select all

SomeOrder[()
{

if keyboard.IsKeyDown(key_number)
{
// do some stuff
}


}]
And, voila. HighLevel keyboard reading.
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599
Post Reply