dabrowskipl
-
Content Count
8 -
Joined
-
Last visited
-
Medals
Posts posted by dabrowskipl
-
-
Also I'm not sure if I got this error by placing this script in init, but this showed up when I closed the game
-
To your last problem:
Add this to your suspect's init:
handcuffAction = this addAction ['HANDCUFF','handcuffScript.sqf','',1,true,true,'','((_target distance _this) < _range)']"
Where you have to replace _range with the distance you want to be able to catch the suspect (try with 4).
Create in your mission folder: handcuffScript.sqf
_suspect = _this select 0; _police = _this select 1; _action = _this select 2; _suspect disableAI "MOVE"; ///_suspect setCaptive true; _action removeAction _suspect; hint "SUSPECT IN CUSTODY";
As far as you chase civilian units, you wont need to set them to captive because they are neutral to anyone anyway.
If this is the case, just delete this line in the script, otherwise delete "///"!
Hmm, strange, can't put this script into init of the suspect, it's says "Missing ;" no matter if I change _range to 4 or not.
handcuffAction = this addAction ['HANDCUFF','handcuffScript.sqf','',1,true,true,'','((_target distance _this) < _range)'](error appers here)"
-
Thanks. That seems to work but I got an another problem. First, when I was making the first mission, suspect's car was stopping after 2 or 3 minutes of chasing and driver was getting out and surrendering. Now for some reason in the second mission driver won't surrender even if I block his way with my police car and even when I shoot it's wheels. He just getting out and starting running away. And the second problem is when I name suspect a "suspect", games thinks that suspect is car, not the driver. That's weird. Car can't surrender.It means your _suspect needs a Global variable name, not a _local variable name.
Editor triggers don't use local variables unless contained within a scope, like a forEach command.
Scripted triggers can use local variables though.
for an editor trigger you would just use "captive Suspect" in the Condition field. The Condition field itself is "if ( __ )", and the On Activation field is "then { __ }". The code goes in the On Activation field.
Then I came up with an idea, I remember some old script for ArmA Armed Assault where you could capture a unit in action list when you're enough close to him. So can you give me this script? For example, when suspect leaves car and running away, you just coming near him, choosing "Handcuff" from the action list and he being setCaptive and handcuffed animation.
-
https://community.bistudio.com/wiki/Surrender
"Soldiers surrendering will be setCaptive, disableAI "move", will leave their group, will disembark from their vehicle if they have one and won't be able to climb in another"
if (captive _unit) then [your code here];
Cant find out how to check if "move" has been disabled, but evaluate only captive will do this too.
Thank you! So I need to place a trigger and put "if (captive _suspect)" in On Condition?
UPD: "Local variable in global space"
-
I'm making a mission about Polish police where you need to chase criminals. I've placed Surrender Module so after some time of chasing, criminals stopping their cars, getting out them and surrendering. That's a perfect moment for mission to end. How to make a trigger that activates by their surrendering?
Thanks!
-
I'm not really following, when the marker changes color just after it add the setflagtexture command https://community.bistudio.com/wiki/setFlagTextureI know that I can use setflagtexture, thanks, but is there's any way I can place two objects (flags) in editor, make one "false", one "true" and then swap them by the trigger?
-
I have a mission where you must capture a town. For the first, I placed soviet flag and red marker. Then I made a trigger "OPFOR doesn't present" that changes marker color to green when all enemies are killed. Then I need soviet flag to change into Estonian (I have estonian flag with mod), is there's any way I can do this with my trigger?
How to activate trigger if unit is surrendering?
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
Hmmm... I see now HANDCUFF action but it won't do anything