Home   Help Search Login Register  

Author Topic: Disableuserinput  (Read 630 times)

0 Members and 1 Guest are viewing this topic.

Offline Taggart

  • Members
  • *
Disableuserinput
« on: 28 Dec 2004, 09:50:49 »
I am creating a hostage rescue map, where the hostage role is playable. I wish, however, to disable the inputs only from the two hostages until they are triggered as rescued. How can this be achieved without locking up their inputs permanently. There will probably be a loadout from the mission menu, so anyway of disabling the issue of any weapons to these two individuals, or would it be better to have crates. I could put "removeallweapons this" on their initialisation lines, so that any weapons issued would be removed ?   :)
Tried in vain got an artery

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:Disableuserinput
« Reply #1 on: 28 Dec 2004, 10:09:09 »
Removeallweapons this in the initialisation will remove them before the mission (I think) they could still pick them up from the weapon pool. If I were you I would nab their weapons from them a short time into the mission (like 0.5 seconds).

You can get the hostage players to come back under control at the appropriate time by using DisableUserInput false. A different solution would be to write a script to set the velocity of the hostages to [0,0,0] until a boolean is triggered when they're rescued. The hostages could still look around but they could not go anywhere.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Disableuserinput
« Reply #2 on: 30 Dec 2004, 14:12:54 »
Or put them in a cage of fences until they are rescued, when one of the fences moves to allow them out.
Plenty of reviewed ArmA missions for you to play

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Disableuserinput
« Reply #3 on: 30 Dec 2004, 17:47:45 »
you could put them in a setpos loop. with the right delay (0.5 - 1 second) they can turn and look around but can't move anywhere. is that the effect you're looking for?

Offline Taggart

  • Members
  • *
Re:Disableuserinput
« Reply #4 on: 30 Dec 2004, 18:32:46 »
At the moment both hostages are in separate buildings on the ground floor and join the rescue squad when west enters the trigger area. The only way it would seem I can do this is scripting and the most promising is the setvelocity option though I haven't ruled out disableuserinput. Question though, I'm assuming if you set an individuals velocity as [0,0,0] the opposite should be [1,1,1] to reset? Still playing with both, thanks for assistance.  :)
Tried in vain got an artery

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Disableuserinput
« Reply #5 on: 31 Dec 2004, 01:11:29 »
no. velocity is a vector of speeds [x,y,z]
x = east/west speed
y = north/south speed
z = vertical speed

so setvelocity [1,1,1] would give them a velocity of 1 (m/s? km/hr? some measurement i'll go with km/hr) west,1 km/hr north, and one km/hr up

so to stop them from being held you would just use a condition to exit the loop holding there velocity at [0,0,0]
« Last Edit: 31 Dec 2004, 01:11:41 by Triggerhappy »

Dubieman

  • Guest
Re:Disableuserinput
« Reply #6 on: 31 Dec 2004, 05:14:47 »
I'd stick with Macguba's idea, nothing better than some good ol barb wire security fence. Then deletevehicle it when the trigger is activated or setpos the fence somewhere else or use a script in the ed depot that make a door of sorts out of objects. By Thobson, I'm pretty sure. :-\

It'll allow the hostages to walk about and not be bored & flood the channels, "c'mon guys, the russians won't give me food..." and no one can use their 4x superpowers to "teleport" through the fence. :o