Jump to content

_qor

Member
  • Content Count

    294
  • Joined

  • Last visited

  • Medals

Everything posted by _qor

  1. *push* could anybody at least tell me which name units receive when they get spawned in by _unit createUnit?
  2. Hey there, first question: what happens with the names of dead units? do they still exist or will they get deleted? What I am trying to create is a script which replaces a specific unit when it is dead with a new one. This should work each time this unit or its offspring dies. From my point of view, therefore it is necessary to give the new created units the same name as its parent unit. Otherwise I have to create a script for each time a unit has to be replaced. Would be easier to refer to only one name. So is there a way to delete a name or do you know any workarounds? Thanks for help
  3. 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; } ];
  4. Hey, I still dont really get how to bring some codes together! What I want to do is to spawn a unit to the same position where I placed a unit in the editor. This should happen when the first unit died to replace that unit. So I gave the unit a name and searched for it in the mission.sqm where I found the xyz coordinates. At least I cant find its direction data. So much to the first problem. Next step would be to set up a script which spawns the same unit to the same position with the same direction. So I am not even sure whether I have to take getPos or setPos in the BIS_fnc_spawngroup code. I would really appreciate if somebody would help me on with that! thanks in advance! =)
  5. So I tried out the script and it works as you posted it. Thanks a lot for that!!! Then I customized it to my convenience: unitSpawnGroup=group G1; G1 addEventHandler ["killed", { _unit = [color="#FF0000"]unitSpawnGroup[/color] createUnit ["US_Soldier_EP1",[7966.39,2003.93,0.00143433],[],0,"FORM"]; _unit setPos [7966.39,2003.93,0.00143433]; _unit setDir 325; } ]; I still dont get the red marked part of the script. It obviously defines the group of the unit, but is that really necessary to create the unit? And what stands the parts after the coordinates for? Another problem is, that the firstunit stands on a watch tower. So when the new unit spawns, it spawns right under the lookout not IN the lookout (higher position). I tried with getPos copyToClipboard and with the coordinates from the mission.sqm. Seems that they are both really different! Regarding the fact that the mission.sqm sorts it in x,z,y order, both are wrong! mission.sqm (x,y,z sorted) 7966.4082,2004.3481,301.24911 copyToClipboard 7966.38,2003.93,0.00143433 So I just replaced the z coordinate with 7 and the unit almost spawns at the same as the first one. But I need to have it spawned about 5 seconds after the first unit has been killed. G1 addEventHandler ["killed", { [color="#00FF00"]sleep 5;[/color] _unit = _grp createUnit ["US_Soldier_EP1",[7966.4082,2004.3481,5.5],[],0,"NONE"]; _unit setPos [7966.4082,2004.3481,5.5]; _unit setDir 325; _unit disableAI "MOVE"; } ]; Unfortunately it doesnt work this way. Where do I have to add the sleep command in the script for that?
  6. Hey there, what I am on to create is a vivid and automatic world in which the player find some tasks and missions. I am using Takistan where are two main bases of BLUFOR. That both should work like kind of a self-healing object. There are several units on their sentry: at the gate, on the lookout and elsewhere repairing vehicles and so on... I already placed them in the editor. But assuming the base will be attacked, all the units are leaving their positions and the base will descend into chaos. Therefore I am hoping that there is a way to "reset" the whole scenario. E.g. by finding out the x,y,z positions of each unit and spawn them at a certain time. In this case, I currently dont know what happens to the former units whose positions have occupied by new units. Or the same with units which are actually at "their place"... Does anybody already got experience with similar scenarios? I really trust in you guys that you can assist and give me some advices. Thanks in advance!
  7. Hey there, I have asked myself about how many various conditions I can set for example in a trigger's condition. It seemed to me that if I have a condition like unit_x in thislist I couldnt add another condition like west countSide <= 5. >>unit_x in thislist AND west countSide <=5 The usual reason would be that I still dont get the scripting right but I often had problems with that. This is only an example, I can update it when I found out at which point it wasnt possible to me... So is there an answer to the question? Is it possible to have multiple various conditions and if, are there certain rules? Or in general, can I add about 50 conditions to a trigger hypothetically?
  8. Okay I was afraid of those answers :P First of all, what is wrong with the code above? Especially because it works as you said. west CountSide thislist <5 AND abc = true I guess thats kinda code which didnt work... Can you explain the sentence more detailed? "A value you can compare against to"? Bool means, that it is a variable which is either true or false, right? I am trying to get deeper into the scripting language and have to really comprehend those circumstances!^^
  9. I am trying with a simple hostage script. This is the "Follow Me" script which enables the AI to move and to join the player's group. And this the "Wait" script which disables the AI's movement and let it leave the player's group. But what I want to achieve is, that any enemy unit can "catch" the hostages so they are member of that group. I already tried to remove the "_talker removeAction _action;" line so its alway possible to let the hostages follow. Unfortunately this doesnt work as well as when the hostages leave the friendly group. Shortly, I want all the BLUFOR and OPFOR and RESISTANCE to have the option to let the hostages follow their group at anytime. Have you got ideas? Would be great if this would be possible in multiplayer as well.
  10. Yah right, I want the BLUFOR to get the hostages to a rescue point and the OPFOR to avoid that. So the OPFOR needs to have the possibility to "steel" the hostages back. Besides OPFOR should have the possibility to hide the hostages previously. But apparently it doesnt work that the hostages leave a group via join grpNull. I tried with a BLUFOR and another playable OPFOR unit. Unfortunately, being an OPFOR unit I couldnt "use" the hostages although they has left the BLUFOR group before via grpNull. Really dont know why, got some ideas but they turned out as wrong. And is still questioning myself how this is possible in multiplayer when there is more than one "player"...
  11. I think this is a great idea for making some interesting singleplayer action without walking a straight line from start to end as in the given missions! //What I could imagine are some OPFOR strongholds on the map far away from your base. Some BLUFOR AI-squads may frequently start attacks and the player can join whenever he wants. You can also send some patrols around the enemy areas. //Additionally the implemented support radio can be interesting. The computer will send a MEDEVAC when support is called by the AI. I made a sp-mission with this support via radio and I was surprised about how the AI reacts among themselves. The AI will send a support call and another AI will fly straight towards the battlefield and supports them. So the world gets vivid which actually is the intention for such a "world" you want to create. http://sandbox.darrenbrant.com/arma/how-to-setup-armas-built-in-support-system //Perhaps you can also use BIS_fnc_UnitCapture to record some vehicle-movements and play it afterwards. E.g. for suicide attacks on your base. http://forums.bistudio.com/showthread.php?101421-OA-UnitCapture-amp-UnitPlay-Functions&p=1666316#post1666316 //Another idea would be a board where you can start several missions by script. You could collect all your ideas for given missions and make them accessible in one mission. If the missions are getting bigger, I guess it is necessary to find out how you can "outsource" them. Means that you will load those missions... So it would be better to keep those missions small to have them in the same environment so they can react among themselves sometimes. I really like your idea - kind'a awkward that I didn't made such an environment on my own so far because actually its a simple idea... Gonna try out your suggested methods and will share my results and ideas later on ;) thanks!
  12. I want to have an AI unit which fires a rocket on a specific object/car/unit. Does this specific object needs to be an enemy one? Or can I have the AI to fire on an empty car as well? Same with a tank turret, is that possible? Thanks in advance ;)
  13. But the unit will fire with its rifle. It only switches automatically to secondary weapon if there is an driving enemy vehicle. The unit will also try to shoot the unit inside the vehicle with its rifle. The selectWeapon command doesnt work.
  14. Aaah great! Strange that "unassigneVehicle" doesnt unassign the vehicle ;)
  15. Hey, I'm trying with UnitCapture and UnitPlay to make a nice extraction with several boats. So I needed to create a trigger which makes the units inside a boat to get out when the boat is at shore (via an defined area): {_x action ["eject",Team1];unassignvehicle _x;} ForEach units Team1; This works so far. But the units won't move on to the next waypoint, instead they get back in the boat again. I suppose they need a "Get Out" waypoint to realize that they have to move on WITHOUT the boat. So I tried with commandGetOut instead of "eject" but that doesnt work as well. Hope you guys can help, thanks in advance ;)
  16. Hey there, There are several teams which I want to track on the map or at least its groupleader! If the groupleader is dead, I want the marker to turn to black. So I put this in my init.sqf: while{alive leader TeamBravo}do{ "BL" setMarkerPos (getPos leader TeamBravo); "BL" setMarkerDir (getDir leader TeamBravo); }; sleep 0.5; if (!alive leader TeamBravo) then {"BL" setMarkerColor "ColorBlack"}; Works well so far, but if the Leader is dead, the marker doesnt change its position to the next leader (which will be appointed if the first leader is dead). Any idea? Unfortunately I've got none... Another thing about this is that I dont know how to adapt this to work for more squads: while{alive leader TeamAlpha}do{ "AL" setMarkerPos (getPos leader TeamAlpha); }; "AL" setMarkerColor "ColorBlack"; while{alive leader TeamBravo}do{ "BL" setMarkerPos (getPos leader TeamBravo); }; "BL" setMarkerColor "ColorBlack"; while{alive leader TeamCharlie}do{ "CL" setMarkerPos (getPos leader TeamCharlie); }; "CL" setMarkerColor "ColorBlack"; sleep 0.5; Only the marker for Team Alpha is moving.
  17. Great, thanks for all of your help guys! What I was imagine myself is like option 2) by XxAnimusxX: There is a marker for each squad (static number of squads). Each marker should follow the leader of the squad. If a leader dies, the marker should follow the new appointed leader. This should cycle so far, until the last unit of the squad dies. In this case the marker should turn to black. The script by XxAnimusxX seems to work great! There is a delay when a leader dies and a new one is about to get appointed. In this time the marker is black. I guess this is due to the existing delay in-game?!
  18. I want a trigger only to trigger if task3 or whichever has been accomplished! So what do I have to write into the init-box of the trigger? thx in advance!
  19. Hey there, What I want to achieve is the division of the map into 2 defined areas and the rest of the map. 1.)When unit is in the first area, it should not be captive at all - afoot or in a certain vehicle. 2.)When leaving the area, the unit should be captive only if in that certain vehicle. When leaving the vehicle the unit's captive-mode should turn to false and return to true if entering the vehicle again! This should switch every time the unit enters or leaves the vehicle! 3.)In the last area, the unit should be captive, but only with a timeout of 30 seconds! A drawing makes this easier to apprehend ;) What really makes the problem, is that the captive status doesnt switch each time the unit enters or leaves the vehicle in the actual map-area (2.)). Additionally, the third area doesnt seem to recognize the unit when the vehicle is a heli flying! Hope you guys can help, thanks in advance!
  20. But how can I combine the eventhandler with a specific area? This is why I tried to figure it out with this: IF (vehicle player == MH) THEN {player setCaptive true AND hint "sC=true"}; and it does work with several trigger areas, except that in the map-area (2.)), setCaptive only changes one time from true to false. When entering the vehicle again, setCaptive = false stays! I need a code that checks in some interval if player is in vehicle!
  21. Is there a possibility to show hints only to specific units? Perhaps there is another way to show a text-message which makes this feasible?! I couldnt find any
  22. I want to make support available if one of 4 units are within the area of a trigger. But two of those units are moving with aircraft. Unfortunately the trigger doesnt fire if those two are entering the area flying. Landing within the area will make the trigger to fire. How do I have to set the trigger up to make it firing on flying units?
  23. It comes to a stop at the point I have to group a group with the trigger ;) Doing so, the group of units isnt grouped anymore!
  24. Strange, that didnt work for me. I will give it another try, thanks mate! But apart from this, it is not possible to group more than one unit with the trigger, except they are in the same group. That is a big minus for that method, or is there a trick to group more units with the trigger? Additionally, if you are the leader of the group, the editor ungroups the unit which gets grouped with the trigger! Okay, you can use _playerGrp = group player... What is the work-around of all this?
  25. Nope, it doesnt unfortunately! Why does the trigger only checks the ground for boolean? Found this and it seems to work... source:http://forums.bistudio.com/showthread.php?100961-set-height-of-trigger&highlight=set+height+trigger So I tried with: found = false; {if (getPosATL _x select 2 > 10.0) then {found = true;};} forEach thisList; found; Pilot in thislist OR Medic in thislist; But it still doesnt work when flying in height of more than 10 meters within the area of the trigger. I guess there is something with the "forEach thisList"?!
×