

KrazySwede
Member-
Content Count
17 -
Joined
-
Last visited
-
Medals
-
Medals
-
Community Reputation
10 GoodAbout KrazySwede
-
Rank
Private First Class
Contact Methods
-
Youtube
Fdash16Cluvr
-
Unable to get accurate position of a placed backpack with getPos
KrazySwede replied to KrazySwede's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Good observation. It's not quite double but maybe that's a result of rounding. Thanks for reporting it. -
Unable to get accurate position of a placed backpack with getPos
KrazySwede posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I named a backpack "thepack" and placed it next to me in the editor. I then entered the following into the Debug console to return my position and that of the pack: hint format["Me: %1\nPack: %2",getPos player,getPos thepack]; It returned two very different positions, even though I was sitting right next to the pack (see image). I am trying to mark the pack's position with a marker, but this is proving difficult since I can't rely on getPos to get the the pack's position. Does anyone know why this is happening? http://i.imgur.com/ZvuRBqb.jpg (305 kB) Thanks, KrazySwede -
Preventing a mission from being rehosted by a client
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@Harzach and marker It's not something I am looking to do with everything I create for Arma, I just want to have the ability to keep some content private without being confined to a password-protected server. The PBO approach sounds interesting, but [ASA]ODEN suggested a solution with the same idea as alleycat - keeping it all on the server. I simply put my mission script in my Arma 2 folder (using subfolders) instead of the mission folder to prevent them from being PBO'd and cached to clients. -
Preventing a mission from being rehosted by a client
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@AVIBIRD 1: I understand your frustration, but I have no patience for those who edit and host my mission as their own against my expressed wishes. That is why I am spending time trying to implement this feature instead of making missions. Thanks for the suggestions. Couldn't it be called from a script in the regular Scripts folder (ArmA 2 Other Profiles\Me\Scripts), since these are not sent to the client? But even so, what I can't get my head around is how to call the function in a way that can't simply be edited or removed after de-PBOing the mission. -
Preventing a mission from being rehosted by a client
KrazySwede posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is there any way to prevent a mission from being rehosted by a user who has played the mission? I'm referring to the PBO copy of the mission that ends up in the MPMissionsCache folder which can then be moved to the MPMissions folder and hosted. -
Scripting a trigger with multiple conditions
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, I was so focused on setTriggerActivation that I completely overlooked that first parameter in setTriggerStatements. -
Scripting a trigger with multiple conditions
KrazySwede posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
In the editor you can add multiple conditions in a trigger's "Condition" field, like... this AND alive unit Can this be done with a trigger that's created via an SQF script, and if so, how? Thanks, Marcus -
Trigger vertical dimension/limit
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, Carl Gustaffa. I tried that method out in the editor and it works great, but (as far as I know) the means I have of manipulating a trigger's activation up when adding it via a script is the setTriggerActivation command. I'm not sure how I'd incorporate the aircraft check when adding the trigger by script. Marcus -
Trigger vertical dimension/limit
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think the second approach is the way to go in terms of a work-around, since I still want units in ground vehicles to activate the trigger. I am creating the trigger through an SQF script though, and not the editor, so I'm not sure how to add additional conditions that must be met before its activates. As for the code you posted beita, if I'm not mistaken shouldn't that be ...(_x getPos select 2) < 2... in order to identify those under 2m? I also wonder if getPosATL should be used as opposed to getPos. I'm not sure where getPos measures from, but if getPosATL measures height from the terrain level, I can only imagine getPos does it differently. I'm just throwing ideas around though, and want to make sure I have all the details worked out :). I can't do anything until I figure out how to implement multiple conditions on a trigger through scripting though. Does anyone know how that's done? Thanks, Marcus -
Trigger vertical dimension/limit
KrazySwede posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is it possible to set a vertical limit on a trigger's activation area? I'm trying to create a trigger that can be activated by ground units but not by an airplane flying through it at 500ft, for example. I know I could check to see if the unit activating the trigger is in an airplane, but I'm wondering if there's anything that can be done to the trigger itself. Thanks, Marcus -
Defining local variable with "setTriggerStatements"
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
UPDATE: For practical purpose my problem is solved by using the workaround I mentioned in my last post. This is part of an IED script I had previously made, but it was using two scripts to run so I wanted to simplify the project and combine the two into one. The resulting issue of having ALL IEDs go off when any one is triggered is obviously a problem. Sure, IEDs are unsafe and unpredictable, but I don't want to have that much fun, hehe. (I changed my variable names a bit.) I have the object (the IED) name stored in _targetname and I changed my setTriggerStatements to look like this: _trigname setTriggerStatements["this",format["activeied = '%1'",_targetname], ""] And then my waitUntil looks like this: waitUntil{activeied == _targetname OR (damage _makeied) > 0}; _makeied is the object acting as my IED, on which the script is executed. So, instead of having a local boolean variable that triggers the IED by being true, there's a global variable that triggers an IED when it stores that IED's name. So all my IEDs are waiting for their names to be called, so to speak. Barring any unforeseen multiplayer problems, I should be good to go :D. EDIT: Works without a hitch in multiplayer as well. -
Defining local variable with "setTriggerStatements"
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That the way I had it set up at first, however, this script is running on multiple objects. So I have objects A, B and C lets say, and I have executed my script on each. A trigger is created on each object and I only want to execute the code after the waitUntil at a single object when its trigger is activated. If I make that variable global, the code is executed on all three objects since they're all waiting for that one variable which has global scope. I can't include my code as part of the setTriggerStatements activation parameter because I want the code to execute not only if the trigger is activated, but also if the object is damaged. So the waitUntil actually looks something like this: waitUntil{_varname OR (damage _theobject) > 0}; I have a couple of other methods to try as well, like assigning my object's name to that global variable and then checking for the name in the waitUntil, or even calling another script which is the way I used to do it before I decided to (ironically) "simplify" this project. I'm still learning the ins and outs of ARMA scripting (PHP is my cup of tea, hehe) so I appreciate the help :). -
Defining local variable with "setTriggerStatements"
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the explanation, it is as I feared then. I'm using the trigger in conjunction with a "waitUntil" in a script run on a number of objects. WHat I was hoping to achieve was to hold up the script for a particular object until this trigger had been activated. With the trigger defining a global variable, the "waitUntil" checks out for all the objects. I tried using waitUntil and the name of the trigger but to no avail, ie waitUntil{_mytrigger}; Thinking it would return true when activated. I'll have to tinker with it some more later. Looking at createTrigger I see that its return value is an object so I might be able to use that to my advantage. Back to the drawing board, hehe. In any case, thanks for the input :). -
Defining local variable with "setTriggerStatements"
KrazySwede posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is it possible to define a local variable in "setTriggerStatements"? I can define a global variable with _mytrigger setTriggerStatements["this","varname = true", ""]; But I have not been able to figure out a way to set it up with a local variable. Can it be done, and if so, how would I do it? I have a feeling the answer to my first question is no, since the trigger wouldn't know where to define the variable. With a global variable scope is not a problem, but it would be if the variable was to be local to the SQF script I am creating the trigger with. Thanks, Marcus -
"createUnit" works with men but not vehicles
KrazySwede replied to KrazySwede's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, this worked like a charm. Here's the wiki page on the command: http://community.bistudio.com/wiki/BIS_fnc_spawnVehicle