Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Sniper Mission? (using PBUM)

Author
Message
Yearcut
User Banned
Posted: 26th Nov 2009 08:18 Edited at: 26th Nov 2009 08:21
Hi all,

I am making a sniper mission and would like to make my gun zoomed all the time and restrict player to zoomout. I tried and got this:



Its a MSG90 weapon script. I also tried using triggers and gunspec.txt but none of them did the job.

Here is the trigger zone script (its contains some other stuff also)



Can someone please try to help me? none of them work.

EDIT: Another question - Is it possible to restrict player's sniper gun's angle, so that plr can only see the parts i want him to and not look back and stuff, is there a command like restrict camera angle to 120 degree to so? if not is there a way to do so?

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 26th Nov 2009 23:19
Quote: "is there a command like restrict camera angle to 120 degree to so? if not is there a way to do so?"


I believe Fenix Mod has commands that restrict the player from looking past a certain angle. Unfortunately, I don't think the commands have been perfected yet

Kravenwolf

Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 27th Nov 2009 02:31
enterzoom and most of the weapon commands can only be used as part of a weapon script.

You'd need to have something in your triggerzone script like:



and then in your weapon script have something like:



That's not full solution, just a pointer in the general direction. You'd still need to script the lockout for prohibiting zoomout and make the player able to leave zoom when they leave the zone (if needed). You will also need to make it so that the player can't hide the weapon by pressing the zero key if you don't want to allow that.

I don't know about limiting the angle explicitly but a quick and dirty way is to use the AirMod commands for inview and plrpointatobject actions.

Basically, say you are wanting the player to look at the side of a building. You make a small entity like a sign or something and stick it on the wall, make it dynamic and give it a script like:



That will make it so that if the variable has been set to targetarea 1 it will initially force the player to look at the object and then keep it on screen. If they look away it will snap them back to looking in that area. The problem would be that it gives you a smaller area which you can look around in but you can set the targetarea variable to different locations after you have killed the target or whatever. It would be sort of like having a spotter directing the players attention to different areas. Hmmm. I'm actually tempted to try this now lol
Yearcut
User Banned
Posted: 27th Nov 2009 07:53
Thanks Errant AI, I will try it and edit my post if it works or not.

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Nov 2009 02:09
Thanks for filling in how to dot he weapon script, Errant.

For restricting the player's viewing, you can use the "cameraangx/y/z" commands. Okay.... maybe not the "camerangz", lol, unless you're having the player lean.

Optionally, you also have access to the internal variables for the camera, such as "$CAX", "$CAY", and "$CAZ" for checking what the camera's angle currently is.


The one and only,


Login to post a reply

Server time is: 2024-11-25 05:47:27
Your offset time is: 2024-11-25 05:47:27