Jump to content

Rhys Priestland

  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by Rhys Priestland

  1. Hello there, I'm making a control tower that can control multiple border gates for an upcoming server. Relatively new to scripting, and only know the abseoulte basics. All have to start somewhere. So the set up is, I have an addiction to open the script file on the Init of a object. Firstly how would I remove that add action after it has executed the script file Next part, the script so far (pls dont comment on my newbness :) _target = _this select 0; _caller = _this select 1; _actionId = _this select 2; //North Gate 1 _caller addAction ["Open North Gate 1", {NG_1 animate ["Door_1_rot", 1]}]; _caller removeAction _actionId; _caller addAction ["Close North Gate 1", {NG_1 animate ["Door_1_rot", 0]}]; _caller removeAction _actionId; So what this displays is only the second addaction, Close northgate 1, which is not what I would want to do. Ideally I would like to the person to only see the Close North Gate Addaction after executing the open northgate Addaction and for the Open Northgate addaction to be removed?. Im unsure how to write this using the SQF syntax, and have been scratching my head for the last 2 hours. Also after executing Close Northgate I would like them to see the Open northgate again. How would I go about doing this? Thanks for any help you give me! Regardless of the type of help, all help will be greatly appreciated Best Regards Rhys Priestland
  2. Rhys Priestland

    New Scripter, Trivial Question!

    /* File: Border.sqf Author: Rhys Priestland Description: Used for controlling gates at Nato Border BRITISH RP USE ONLY. */ _target = _this select 0; // Object that had the Action (also _target in the addAction command) _caller = _this select 1; // Unit that used the Action (also _this in the addAction command) _actionId = _this select 2; // ID of the Action //North Gate 1 _caller addAction ["Open North Gate 1", { // code NG_1 animate ["Door_1_rot", 1]; },1,true,true,"",' // condition NG_1 animationPhase "Door_1_rot" isEqualTo 0 ']; _caller addAction ["Close North Gate 1", { // code NG_1 animate ["Door_1_rot", 0]; },1,true,true,"",' // condition NG_1 animationPhase "Door_1_rot" isEqualTo 1 ']; //Northgate 2 //Southgate 1 //Southgate 2 //Lockdown Hiya again! Sorry about that. So this is the code above i'm using so far. The _caller in this case, is just the player, So I've probably messed up the syntax somewhere! Here is the error https://gyazo.com/92cc92cfd32f04293156d38afcd48d39 Thanks again!!!! Best Regards Rhys Priestland
  3. Rhys Priestland

    New Scripter, Trivial Question!

    Hi there again, When you said some object. when using _caller, player, or the object name, Arma throws an error? Any reason why? Sorry to be troubling you! Thanks again Priestland
  4. Rhys Priestland

    New Scripter, Trivial Question!

    Thanks so much for the responces! Tajin that was great, exactly what I needed! Also Grumpy that was great too. By any chance do you know how to get rid of the addaction to open the script. So when I go to the laptop it gives me an addaction which activates the script. Once activated I want that addaction to go away so that you cant open the script 100 times? Thanks again for your responces! Best Regards Rhys Priestland