Jump to content

Dnote Gaming

Member
  • Content Count

    6
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Dnote Gaming

  • Rank
    Rookie
  1. I changed it to {null = [ _unit] execVM “Assault.sqf”}; and still nothing, also I removed that command and just put a simple hint command and it still won’t work. I don’t think the if command checks the _class or recognizes the string “Assault1”. do I need to declare Assault1 as something first before I use it in the if statement? it’s really just a filter so that only the unit with the variable name Assault1 will access the Assault.sqf script.
  2. @pierremgi I don’t want the same full loadout I want a different primary weapon on respawn. Also the 3den enhanced single player respawn uses the same unconsciousnesses as the killed state. My problem is I can’t get my if statement to check the new state of _class. the hints command works and shows Assault1, but then when I reach the if statement to check if _class = Assault1 it says Generic error in expression. what am I missing for my if statement? Or am I writing the wrong code?
  3. So here is what I want to do using Single player respawn from 3den enhanced. Every time a player respawns I want them to get a random weapon from a custom array. I want to use their variable names to determine which weapon array they will get their weapon from. #WORKS = code is working #HELP = code is not working UnitClass.sqf // runs on every respawn _unit = _this select 0; _unit setvariable [“myvariable”, _unit]; // sets the Eden editor given variable name “Assault1”. #WORKS _class = _unit getVariable “myvariable”; // gets the assigned variable name. #WORKS hint format [“%1”, _class]; // shows the variable name as a hint. #WORKS if ( _class == “Assault1”) then {null = [_this] execVM “Assault.sqf”; }; // supposed to run script but does not work. #HELP from the code above I get a generic error in expression, or it just does nothing. Assault.sqf // supposed to get called when if statement return’s true _unit = _this select 0; hint “hello”; // just to visually verify the code is executing. #WORKS _pWeap = primaryWeapon _unit; // supposed to get the primary weapon string name of unit. #HELP _unit removeWeapon _pWeap; // supposed to remove primary weapon only from given string name. #HELP the _pWeap keeps giving me “ error primaryWeapon: Type Array. expected object” I don’t know what array it’s getting the unit only has 1(one) primary gun. if you notice anything what my codes are missing or could change to make them execute I’d appreciate the feedback.
  4. Can I get an example using these commands or could you correct this. I am quit lost on how to implement these properly. //code _unit = _this select 0; // would make sure the current unit is selected? _unit isKindOf “Assault”; // would tell Arma 3 that this unit’s variable name is Assault? if (_unit == “Assault”) then { null = [_unit] execVM “Assault.sqf”;}; // would tell Arma 3 to run this script for the selected unit?
  5. So I’m new to coding in general and thought I’d try out scripting in arma 3, I have written code but it does not do as intended. And I don’t even know if I’m using the right commands, I’m done trying to rack my brain scouring BI script command list and random YouTube videos if anyone know how to achieve this please post it here or reference me to where I can get help. so here’s what I want to do: 1. Give variable name in Eden editor. 2. Get variable name given in Eden editor for reference in script as a “class”. 3. Use variable name “class” to run a specific script. plot example: Object (unit) variable name given in editor = Assault //in script code to get the variable name of “This” unit. code to check if the variable name is equal to a specific class name. code that executes another code if the check returns true. if you have any insight on how to achieve this or even close to it please reply
  6. First can this be done in the Eden editor, in the units init field or do I have to edit the main mission script file for that unit. Second can I get n expel script on how exactly to implement this please?
×