Jump to content

_qor

Member
  • Content Count

    294
  • Joined

  • Last visited

  • Medals

Posts posted by _qor


  1. Hey,

    the ASR AI mod has a feature which broadcasts information about enemies to all friendly units within a configured range.

    This would enhance the original AI, which often run around right in the middle of combats without really "hearing" shots.

    Is it possible to integrate only this feature to the original AI?

    Or has a mod for this already been published?


  2. Hey,

    when I am placing an Heavy Factory on a certain position on the map, its VectorDir (I guess) is somehow changed.

    So the Heavy Factory is leaning to some direction.

    Unfortunately I was failing when trying to adapt it by using setVectorDir with data from another Heavy Factory standing straight.

    Does someone know what to do?

    Even

    _obj setVectorUp surfaceNormal position _obj;

    didnt work


  3. Okay, new one!

    What if I additionally would exclude a group? Call it Group4...

    so far I tried this ._.

    {_x switchMove "" AND _x setBehaviour "COMBAT"} foreach list SBbehave - [player AND Group4]
    {_x switchMove "" AND _x setBehaviour "COMBAT"} foreach list SBbehave - [player AND group Group4]
    {_x switchMove "" AND _x setBehaviour "COMBAT"} foreach list SBbehave - [player AND units Group4] 
    

    same with comma


  4. Hey there,

    as you might know one can play sounds by script by playSound "soundName".

    So I always used "beep" as soundname for the accordant name of trigger sound in the editor. This is simple because it is the same name as in the trigger!

    But I never found out other soundnames like "Code (Bad) and "Code (Right). Additionally I cant find any list summarizing all the soundnames.

    So especially for that both sounds, what might be the names of them?

    How could I find out?


  5. Unfortunately both methods doesnt work as I want them to.

    flyInHeight 0 doesnt make them to stay and attachto freezes their rotor blades and causes other problems.

    What I noticed is that when I used moveInCargo the helis stayed at the ground. So with waypointAttachVehicle it seems that the vehicles also respond to that. Same as if set up in the editor, you synchronize GETIN for infantry and LOAD for vehicles. This also makes helis to hover while waiting on infantry.

    Another thing is, that the helis all hover to the same point where they want to collect infantry...

    EDIT://

    found a solution for at least my situation:

    The helis doesnt start to hover when placing an helipad! Apparently helipads are necessary for helis to have a proper take off and landing, I keep on have a look after this!


  6. Works great!

    What I actually was looking for was the waypointAttachVehicle code. Couldnt find out how to create a getin Waypoint correctly.

    So but this way, the heli takes off before the group entered completely.

    See the following script.

    I added doStop to make the helis to stop but that doesnt work as well.

    NBch2 engineOn true;

    doStop NBch2;

    sleep 2;

    NBch1 engineOn true;

    doStop NBch1;

    sleep 1;

    NBch3 engineOn true;

    doStop NBch3;

    sleep 4;

    if (canMove NBch1) then {

    NBgrp1 = [getMarkerPos "NBg1" , west, (configFile >> "CfgGroups" >> "WEST" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")]

    call BIS_fnc_spawnGroup;

    {_x setSkill ["general",0.99];} forEach units NBgrp1;

    wp1 = NBgrp1 addWaypoint [getPos NBch1, 3];

    wp1 setWaypointType "GETIN";

    wp1 waypointAttachVehicle NBch1;}

    else {};

    if (canMove NBch2) then {

    NBgrp2 = [getMarkerPos "NBg2" , west, (configFile >> "CfgGroups" >> "WEST" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")]

    call BIS_fnc_spawnGroup;

    {_x setSkill ["general",0.99];} forEach units NBgrp2;

    wp1 = NBgrp2 addWaypoint [getPos NBch2, 3];

    wp1 setWaypointType "GETIN";

    wp1 waypointAttachVehicle NBch2;}

    else {};

    if (canMove NBch3) then {

    NBgrp3 = [getMarkerPos "NBg3" , west, (configFile >> "CfgGroups" >> "WEST" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")]

    call BIS_fnc_spawnGroup;

    {_x setSkill ["general",0.99];} forEach units NBgrp3;

    wp1 = NBgrp3 addWaypoint [getPos NBch3, 3];

    wp1 setWaypointType "GETIN";

    wp1 waypointAttachVehicle NBch3;}

    else {};

    waitUntil

    {{_x in NBch1} count units NBgrp1 == count units NBgrp1 AND

    {_x in NBch2} count units NBgrp2 == count units NBgrp2 AND

    {_x in NBch3} count units NBgrp3 == count units NBgrp3};


  7. Hey,

    I cant find out how to make a spawned group to enter a vehicle.

    Actually I want to do this by addwaypoint so the group is really walking to the vehicle!

    But if there are other methods I'm glad to hear those.

    This is the alternative way I already tried:

    {_x assignAsCargo NBch1} forEach units NBgrp1; {orderGetIn true} forEach units NBgrp1;

    Of course, moveInCargo works fine, but it looks weird when the group pops up and disappears straight.


  8. When I was testing with AI's behaviour modes, I noticed that in some situations AI doesnt change back to AWARE behaviour as it should.

    This is important to me, because this is an important script event in my mission.

    Expectation:

    when all team members died (unit doesnt report member with higher rank which would actually report "area clear") and/or unit/team member is wounded

    Can anybody assent to this? Have you done other experiences? Known bug?


  9. Hey there,

    I have got no experience with using random, but apparently I have to use it this time.

    To simulate some assaults I want to spawn units at times. I imagined preset "compositions" of enemy waves or smaller groups which try to seize the base.

    Therefore I would use random places and times for each "composition".

    I've got some ideas, but perhaps you can help me out to use random with spawning units before I build up a circuitous system. Can I use markers to have random spawn places?

    Or you have got more efficient ideas to achieve almost the same result.

    And what about ACM, can it be configured to make it work for this?

    //thinking more about it, it isnt absolutely necessary to spawn random classes when thinking of those "compositions". But I would be interested in if this is possible!


  10. I guess the team will stay without any formation as long as a new waypoint is assigned. How did you set it up in the editor?

    Of course you can add this to the init of the leader of the group

    {_x setFormation "LINE"} forEach units group this

    look here for all formations http://community.bistudio.com/wiki/setFormation

    What do you mean by "disable formation"?

    The only way to really disable any kind of formation is to dismiss the team members by creating the corresponding waypoint.

    The group will rearrange if they come into contact with enemy units.

    see here http://community.bistudio.com/wiki/Waypoint_types#Dismissed

    You could also ungroup all team members and create a new group if needed

    [unit1, unit2, unit2 ...] joinSilent LeaderName


  11. Hey there,

    I have got a problem with my spawned group:

    They have got a waypoint somewhere on the base, but after reaching it, the group doesnt go to the next assigned waypoint but instead they just go north...

    This circumstance doesnt happen everytime but this might be due to all the changes I do at the script.

    So this time it happend again, and perhaps I finally realized where they want to go.

    I placed several OPFOR units in Feruz Abad which is north of the South Base in Takistan. But the group actually spawns at the southern Base so they cant know about enemy units in Feruz Abad, dont they?

    Even if there would be a SEARCH AND DESTROY or GUARD waypoint at the southern base...

    Has anybody made similar experiences with spawned groups?


  12. Hey,

    I created a script which spawns an infantry group to guard a base.

    After there are no more enemies, the group moces out to a certain position and is getting deleted.

    Unfortunately, if they are wounded in combat they call support vehicles. There might be the unpleasant case that the group is deleted before they released the support vehicle.

    Thus, the support wont return to their support position and wont support any other AI.

    Is there a code which I can add to the script before the deletion?


  13. I already found this out Peppy, but thanks ;)

    So I finally made it myself, if anybody is interested in:

    Of course you can ask for the whole setup, but it would take some time to write it down here...

    Grp4 = [getMarkerPos "g1SB", west,(configFile >> "CfgGroups" >> "WEST" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")]
    call BIS_fnc_spawnGroup;
    
    {_x setskill ["general",0.99];} foreach units Grp4;
    
    
    wp1 = Grp4 addWaypoint [getMarkerPos "guardpoint", 10];
    wp1 setWaypointBehaviour "COMBAT";
    wp1 setWaypointFormation "DIAMOND";
    wp1 setWaypointTimeout [60, 67, 75];
    wp1 setWaypointStatements ["true", "next = true;"];
    
    
    waitUntil {next};
    
    waitUntil {behaviour leader Grp4 == "AWARE"};
    
    
    wp2 = Grp4 addWaypoint [getMarkerPos "deletegrp", 10];
    Grp4 setCurrentWaypoint wp2;
    wp2 setWaypointBehaviour "AWARE";
    wp2 setWaypointSpeed "FULL";
    wp2 setWaypointCombatMode "YELLOW";
    wp2 setWaypointTimeout [10, 10, 10];
    wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach units Grp4"];
    
    
    
    
    


  14. So I found this thread to the topic: http://forums.bistudio.com/showthread.php?59711-Trigger-Reset

    But the posted way doesnt seem to work for Arma 2.

    But there is another way which I just want to share. I actually posted this thread to get help at this ;)

    Resetting a trigger might be helpful for example to limit the frequency of spawning groups.

    Using setTriggerActivation solves the problem by changing from ONCE to REPEATEDLY and back again by another trigger:

    _trigger setTriggerActivation [by, type, repeating]

    Trigger 1 ("main trigger"):

     Activation: BLUFOR PRESENT REPEATEDLY
    OnAct.: "[i]whatever the trigger should work for[/i]"; [color="#0000FF"]Trigger1[/color] setTriggerActivation ["WEST", "PRESENT", [color="#FF0000"]false[/color]]; [color="#00FF00"]trigger1 = true[/color];

    Trigger 2:

    Activation: NONE PRESENT REPEATEDLY
    Countdown: 10, 20, 30 (opportunity to reactivate Trigger 1 with a delay)
    Condition: [color="#00FF00"]trigger1[/color]
    OnAct.: [color="#000FF"]Trigger1[/color]  setTriggerActivation ["WEST", "PRESENT", [color="#FF0000"]true[/color]]; [color="#00FF00"]trigger1 = false[/color];
    


  15. Hey,

    I am working on a script which spawns a group of soldiers if there are too much enemy threats.

    The script works so far and really worked almost perfectly at a certain state, but now I' really stucked.

    >

    I added an delay of 20 seconds to give the group a chance to spot enemy units. It doesnt care if there are no more enemy units or the group doesnt spot them, after this delay, I want to delete the group at a certain position.

    Additionally, without that delay, the group would instantly receive the second waypoint - which I dont want (they already spawn AWARE and if I spawn them in COMBAT, they stay all the time in this mode).

    I couldnt get out how to check when behaviour changes from COMBAT to AWARE, so I tried with this delay workaround.

    But actually the group doesnt receive the second waypoint. They get back to AWARE but doesnt change the current waypoint to the second one.

    It seems that the script only checks AWARE once after the delay ended.

    Can anybody help me out with that, I am still new to this scripting and I dont really know how the script runs through.

    Does the script always checks the if condition or only once?

    Grp4 = [getMarkerPos "g1SB", west,(configFile >> "CfgGroups" >> "WEST" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")] call BIS_fnc_spawnGroup;
    wp1 = Grp4 addWaypoint [getMarkerpos "guardpoint",10];
    wp1 setWaypointBehaviour "AWARE";
    wp1 setWaypointFormation "DIAMOND";
    
    
    
    sleep 20;
    
    
    if (behaviour leader Grp4 == "AWARE") then {
    
    hint "group4 moves out";
    wp2 = Grp4 addWaypoint [getMarkerPos "deletegrp", 10];
    Grp4 setCurrentWaypoint wp2;
    wp2 setWaypointBehaviour "AWARE";
    wp2 setWaypointSpeed "FULL";
    wp2 setWaypointCombatMode "YELLOW";
    wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach units Grp4"];
    
    } else {};
    


  16. Hey,

    I want to have a delay in my eventhandler script just as in this thread:

    http://forums.bistudio.com/showthread.php?106461-generate-sleep-in-eventhandler-execution

    Can anybody give an example how to add these lines to the script?

    It doesnt want to work the way I tried, here is my script:

    unitSpawnGroup = group X1;
    
    X1 addEventHandler ["killed", 
    {
    
    	X2 = unitSpawnGroup createUnit ["US_Soldier_EP1", getMarkerPos "Xtest",[],0,"NONE"];
    	X2 setPos getMarkerPos "Xtest";
    	X2 setDir 80;
    	[X2] joinSilent grpNull;
    
    }
    ];

×