Home   Help Search Login Register  

Author Topic: User Control Disableing  (Read 713 times)

0 Members and 1 Guest are viewing this topic.

Offline Evan Scown

  • Members
  • *
User Control Disableing
« on: 18 Jun 2006, 14:11:08 »
OK I've worked out how to disable a users control completely but how do I partly disable it so that the user can still look around, just not move?

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: User Control Disableing
« Reply #1 on: 18 Jun 2006, 15:18:56 »
afaik you can't partly disable user input such as prevent him from walking, but you can simulate it with a script

hold.sqs

Code: [Select]
; prevent script to run on anything else than players machine
?! (local player): exit

; get players actual position
_pos = getpos player

;now loop for holding player on position
#loop
player setpos _pos

; check if walking is still disabled
? enablewalking: goto "end"
goto "loop"

;exit script
#end
exit

just call this script as soon you want to have the player nailed down. For some reason it won't let the player to turn around so he can't see what happens behind him. Maybe someone else could solve this.

Just make sure you set the variable "enablewalking" to true to give back movement control.