Search the Community
Showing results for tags 'n00b'.
Found 2 results
-
New to scripting, need help with "undercover" script
cgross220 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey all, thanks in advance for the help. I've been playing with Arma for a while, mostly downloading scenarios and doing a few here and there just with the editor. Recently I've got to the point where I wanted to start making more complex missions and have been trying to learn editing with Arma III through Focker's tutorials. After beginning to get a decent grasp on coding, I started working on the thing that made me learn to begin with; an undercover script. Basically what I wanted was something to where the enemy wouldn't engage the player(s) if the player was in a vehicle or if the player was out of the vehicle, they wouldn't engage if the player was unarmed. It took me a while to get anything to really happen with it but I finally got it to work with each one of those conditions individually using codes. Trying to add them together is where I'm encountering problems. Here's what I have so far (And I understand this probably isn't the best way to go about it but I'm mostly doing this just to learn right now): _onFoot = createTrigger ["EmptyDetector", getPos player]; _onFoot setTriggerArea [0,0,0,false]; _onFoot setTriggerActivation ["player","",true]; _onFoot setTriggerStatements ["this; (isNull objectParent delta01);","",""]; _checkArmed = createTrigger ["EmptyDetector", getPos player]; _checkArmed setTriggerArea [0,0,0,false]; _checkArmed setTriggerActivation ["player",true]; _checkArmed setTriggerStatements ["this;(currentWeapon delta01 =="""");","",""]; _makeUndercover = createTrigger ["EmptyDetector", getPos player]; _makeUndercover setTriggerArea [0,0,0,false]; _makeUndercover setTriggerActivation ["player",true]; _makeUndercover setTriggerStatements ["this; !(triggerActivated _checkArmed) && (triggerActivated _onFoot);","player setCaptive true;","player setCaptive false;"]; Basically what I was trying to do was have the _onFoot trigger activate if the player WAS NOT in a vehicle, and trigger the _checkArmed if the player WAS armed, then use that to activate the _makeUndercover trigger and make the enemy ignore (or engage) the player. I can get the _onFoot and _checkArmed triggers to work when putting the "player setCaptive true;" and "player setCaptive false;" commands in the activation and deactivation, however it appears the triggerActivated is not returning the boolean like I assumed it would (or another one of a million possible ways I went wrong). Thanks again in advance, I'm sure I'll have plenty more questions in the future -
I have a good idea for what I want to achieve with an Arma 3 mod, but I have only just started trying to figure out how to achieve it. What I want is to alter the control scheme for ease of use and to be more familiar to FPS players. BIS's controls leave a lot of room for improvement, here's how I would do it: Interact/Use [MB3]: Context sensitive. Interacts with a world object. Will open standard style menu if multiple options exist (example: choose which vehicle seat to enter). -The goal here is to reduce the number of actions tied to this one control. Only the context sensitive ones remain. 1 [1] : If in menu, selects option 1. Else, equip primary weapon. 2 [2] : If in menu, selects option 2. Else, equip secondary weapon. 3 [3] : If in menu, selects option 3. Else, equip launcher. 4 [4] : If in menu, selects option 4. Else, change grenade 5 [5] : If in menu, selects option 5. Else, opens explosive menu (scroll to choose which to drop or to touch off bombs) -Here we have a standard FPS style weapon choice setup while retaining the ability to navigate Arma menus. Explosive options safely removed from main Arma 3 menu key. Zoom In/Menu Up [MWheelUp] : If in menu, navigates up. Else, increases zoom level if the option exists. Zoom Out/Menu Down [MWheelDown] : If in menu, navigates down. Else, decreases zoom level if the option exists. -No longer need separate control to adjust zoom levels in vehicles and scopes. Mouse wheel for this is very intuitive. Will also switch between reflex sights and scope if that type of sight is equipped. CTRL + MWheelUp or MWheelDown will adjust zeroing if applicable. Up [space] : If prone, move to crouch stance. If crouched, move to standing stance. If standing, then execute step over action. -Replicates the function of the typical FPS jump key. Does this all look possible to do? Any suggestions on what files I will need to edit for this or links to relevant tutorials would be appreciated.