Jump to content

dabrowskipl

Member
  • Content Count

    8
  • Joined

  • Last visited

  • Medals

Posts posted by dabrowskipl


  1. 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. 

    ArmA2OA%2B2015-08-14%2B12-54-31-025.png

    handcuffAction = this addAction ['HANDCUFF','handcuffScript.sqf','',1,true,true,'','((_target distance _this) < _range)'](error appers here)"
    

  2. 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.

    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.

    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.


  3. https://community.bistudio.com/wiki/Surrender

     

     

    "Soldiers surrendering will be setCaptivedisableAI "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"


  4. 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?

×