Jump to content

_qor

Member
  • Content Count

    294
  • Joined

  • Last visited

  • Medals

Everything posted by _qor

  1. So I defined the return values: HDef1 = [getmarkerPos "heavyDefSB1", 300, "M2A2_EP1", West] call Bis_fnc_spawnvehicle; HDef1veh = HDef1 select 0; HDef1crw = HDef1 select 1; HDef1grp = HDef1 select 2; {_x setskill ["general",0.99];} foreach units HDef1crw; sleep 4; wp1 = HDef1grp addWaypoint [getMarkerPos "hdSB1", 10]; wp1 setWaypointType "SAD"; wp1 setWaypointBehaviour "AWARE"; wp1 setWaypointFormation "VEE"; wp1 setWaypointSpeed "FULL"; wp1 setWaypointCombatMode "YELLOW"; So it is working without having the setskill part. Cant find out whats wrong at that...
  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. Actually there is no slope but the building doesnt stand upwards yet. Placing it some meters aside it stands upwards. Seems like an invisible trap the building is hanging in^^ Anyway _obj setVectorUp [0,0,1] helps! I felt certain about already trying that out...
  4. 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?
  5. Hey, how can I exclude the player or other specific units in this code? {_x switchMove "" AND _x setBehaviour "COMBAT"} foreach list SBbehave I tried with this but... {_x switchMove "" AND _x setBehaviour "COMBAT"} foreach list SBbehave AND !player thanks for help
  6. 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
  7. 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?
  8. 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!
  9. 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.
  10. They are placed in the editor as BLUFOR air unit, so they have got an own crew! Due to the progression of the mission I have to think about how to set this up later on, but for this time they just have been placed in the editor. They have got no waypoint or anything, all from the script after the sequence I posted in my last post above. So why do the helis take off and hover?
  11. 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.
  12. 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?
  13. 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!
  14. Hey guys, I am really stuck! I only want to check the behaviour of all units within a trigger's area. So I put this in the trigger: {behaviour == "AWARE"} foreach units thislist doesnt work, pls help out
  15. Okay, is there a reason why this code distinguishes from the usual way to script? thank you F2k Sel!
  16. I am trying it in condition to fire the trigger when all units in it's list are in aware behaviour!
  17. 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
  18. 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?
  19. Great, but how can I set the current command without having a setCurrentComand scripting command? Ah, I could do kind of this: waitUntil {currentCommand MEDEVAC != "HEAL";} But waiting until the group finally released the support vehicle would last longer than just release it...
  20. 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?
  21. 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 {};
  22. 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"];
  23. 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 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];
  24. _qor

    Trigger Reset

    ---- sorry, wrong forum!! pls delete post----
×