OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: SizzlePants on 11 Jun 2007, 04:46:24

Title: Restricting movement, without cutting off user input...
Post by: SizzlePants on 11 Jun 2007, 04:46:24
Hey all.

I'm trying to make a sniper/spotter team - that cant move.  Basicly as you progress through the mission, you (the player) are switched to controlling the spotter, the thing is I want to make it so you can only look around and shoot.  I've already used "disableAI "MOVE" and "setunitPos "DOWN", which works fine for the AI, but I cant think of anything other than "disableuserinput" for the player-controlled spotter and that just plain makes things dull & lifeless!  HELP! :dunno:
Title: Re: Restricting movement, without cutting off user input...
Post by: DucusSumus on 11 Jun 2007, 05:47:09
Short of scripting it so it seems like you're controlling the sniper when you aren't (which would be a hassle), I don't think you could do this.
Title: Re: Restricting movement, without cutting off user input...
Post by: johnnyboy on 11 Jun 2007, 06:56:32
I'm not sure you can restrict a player from moving, and allow him to shoot at same time.

I think you will need to script these restrictions, and make a plausible explanation for these restrictions so you don't piss off the player.   You can add scripts and/or triggers that will detect when player is X meters away from your desired fixed position.  When detected, you can have his buddy or leader radio him "You will be spotted if you leave your position.  Return to position immediately!"  If player continues leaving position, you then detect that, and have the enemy shoot him, or a minefield blow him up, or his own officer shoot him for disobeying orders...etc.
Title: Re: Restricting movement, without cutting off user input...
Post by: LeeHunt on 11 Jun 2007, 21:05:15
Another potential workaround is setdammaging the sniper player to .1 so he can only crawl and then using the trigger Johnnyboy mentioned...
Title: Re: Restricting movement, without cutting off user input...
Post by: SizzlePants on 12 Jun 2007, 04:57:22
Fair enough.  Cheers anyway, gives me food for thought.