Jump to content

Altsor

Member
  • Content Count

    31
  • Joined

  • Last visited

  • Medals

Everything posted by Altsor

  1. Ok, i think I understand that part now, thanks. So functions initialized this way are compileFinal'd? So the following: MyTag_fMyFunction = (compilefinal preprocessfilelinenumbers "Functions\fMyFunction.sqf"); Is only needed if I did not initialize the functions in description.ext??
  2. This thread is very helpful as I am trying to learn this whole deal about how to initiate and call functions in a proper way! Thanks I wouldn't even know how to do this part... Could you (or anyone) provide an example of how this is done?
  3. Actually It didn't really make sense to me at least. Could you explain in bullet points what you want to happen?
  4. Also, what error do you get when trying to open it in the editor? Did you delete any items in the .sqm? If you did thats a nono since it should only be done in the editor so that new item numbers are assigned properly. But yeah, post the code
  5. Whats wrong with that way as long as it works ;) How did you scrpit the plane being hit by a missile? Mind publishing the code?
  6. I don't think you need any isServer clauses. The DAC functions take care of that and make sure everything runs where it's supposed to. At least I found it works fine for a dedicated server and all clients can see the markers
  7. Glad I can help ^^ Just so you know. vehicle1 is not anymore the vehicle you created. After you run _vehicle1 = _grp addWaypoint [_mkrpos, 0]; vehicle1 is a waypoint. It might be a problem later if you want to call the vehicle1. I recomend using another variable for the waypoint like _wp1 or something.
  8. Should I take that as a challenge? ;) But thanks...should have really started editing in vanilla to avoid these kind of things...
  9. This is a relevant question for me. I have been using some objects from an addon (@aiatp) in the editor in a mission I've built. So are you saying that there is no way I can load these objects from the mission folder somehow so that the mission would be standalone in vanilla?
  10. It seems like you are not actually grouping the units/vehcles, but rather they are given waypoints as single units and the fact that the land vehicles stick together is more likely a coincidence. The chopper gets his waypoints and heads straight there not regarding anything else. If you want to group the units then try with the join command. However this will probably not help with the chopper since it will fly straight to its waypoint anyway. How about skipping the grouping thing and just using doFollow on all the units telling them to follow vehicle1 and then give only vehicle1 the waypoints? I dont know if it works but thats what I would try.
  11. Just to check, you are using the latest version of DAC right? 3.1 I think it is. I have managed to get some choppers to spawn and I'm not sure why you are getting this problem all the time. Does it happen even if you make a huge zone?
  12. Altsor

    HVT spawning issues

    Not sure why it doesn't work. Try putting sleep 3; before the waitUntill. Maybe he didn't become alive before the check started since he is created in the same script without delay. Just a theory.
  13. Altsor

    co10 Escape

    Just wanted to say that this is an awesome mission and I have had alot of fun for a long time playing it! So huge thanks to the developers!! :) One question, why is the night so goddamn dark?. Even though its a moonless night, usually you can distinguish the ground from the sky, or see a house that is right in your face. Is there anyway to add a little more light? ;)
  14. Altsor

    HVT spawning issues

    Cool that it works! Pretty nifty script Did you change anything in KauppaPekka's code or what was the problem?
  15. Altsor

    HELP About Addaction

    Whatabout something like this? (see changes in bold) I still dont really understand the creating of a "M_Titan_AA". Can you explain this?
  16. Altsor

    HELP About Addaction

    I might be misunderstanding but the object named bomb is not created untill the countdown is complete? If that is the case then deleteVehicle bomb; would not work since bomb does not exist yet.
  17. Altsor

    HVT spawning issues

    btw, check this out if you haven't figured out how to do a moving marker yet: https://www.youtube.com/watch?v=kg-UMbqRXpk&index=68&list=PL-rNisMp5bxHiyFWCAc2x4ioM1lxHZtpl
  18. Altsor

    HVT spawning issues

    Yeah, you can probably also do what the guy above me suggested. If you wanna do it your way you should be able to put two peices of codes just like this: "B_Officer_F createUnit [ _setpos, [], "[this, getPos this, 100] call bis_fnc_taskPatrol; newUnit = this;", 1, "COLONEL"]
  19. I don't know. Hard to tell. Depends how you set it up with triggers, script and whatnot. Can you send all the codes you are using? Or are you using the condition fields in the waypoints? Because those are know to be a bit buggy.
  20. Altsor

    HVT spawning issues

    Have you tried the tip that was in the createUnit wiki? Then you should be able to use _marker2 = createMarker ["target", newUnit]; _marker2 setMarkerColor "ColorRed"; _marker2 setMarkerPos getMarkerPos newUnit;
  21. I'm quite new to functions with variables and scripting in general and I would really appreciate some help! The code will not even execute and I've been banging my head for hours now. Can someone please take a look? The function I'm trying to run is called spawnHeli (see code below) and its written in a file called functions.sqf. functions.sqf is called in init.sqf by execVM "functions.sqf"; and the spawnHeli function is called in a trigger in the editor by _nul = [getMarkerPos "heliSpawnPoint", "ocra"] spawn spawnHeli; The spawnHeli function I want to run as it is written in functions.sqf: It seams like already in the init phase the end of the functions.sqf file is not reached so can it be some error in the spawnHeli function preventing it from compiling? spawnHeli = { private["_xPos","_yPos","_zPos","_type"]; _xPos = this select 0; _yPos = this select 1; _zPos = this select 2; _type = _this select 3; _spawnMarkerPos = [_xPos,_yPos,_zPos]; if (isServer) then { _heli = []; _crew = []; _crew = creategroup EAST; if(_type == "ocra") then { _heli = [_spawnMarkerPos, 180, "O_Heli_Light_02_F", _crew] call bis_fnc_spawnvehicle; } else { if(_type == "kajman") then { _heli = [_spawnMarkerPos, 180, "O_Heli_Attack_02_F", _crew] call bis_fnc_spawnvehicle; } else { exitWith {}; }; }; _wp = _crew addWaypoint [getPos player, 0]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "RED"; _wp2 = _crew addWaypoint [getPos player, 1]; _wp2 setWaypointType "LOITER"; _wp2 setWaypointCombatMode "RED"; uiSleep 300; _wp3 = _crew addWaypoint [getMarkerPos "wpCas", 2]; _wp3 setWaypointType "Move"; _wp3 setWaypointCombatMode "green"; _Ocra = _heli select 0; waitUntil{ (getPos _Ocra) distance (getmarkerpos "wpCas") < 2000}; {deleteVehicle _x} forEach (crew _Ocra); deleteVehicle _Ocra; } else {}; };
  22. Been trying the code a bit and it works great! Very reasonable to have shorter time for the Kajman as it is pretty overpowered. Actually they Kajman almost surely means your are dead unless you have AA (and even then) so I will only use it once when I know the players have access to AA ;) Sometimes the Orca seems to have some problems finding a target and ends up just circling the players position until it leaves. Not sure why this is. Maybe its to some degree realistic that they don't always spot a target but then I try getting their attention by shooting at them and still the circling just continues. I only tried a couple of times so I'll give it some more tries tonight.
  23. Thanks for the advice! Even after I moved the player away from the zones I encountered some problems which I solved in different ways: 1. By setting the time condition in the zones to a higher value I seemed to get less problems with waypoint errors. I set the conditions in all zones to time>25; I suppose this allows time for all the inits to finish running and then the DAC can run nicely by itself 2. I had a problem where I would get error 7 if I had too many waypoints in all zones combined. The limit seemed to be around 300-310 waypoints. I solved this by using the function to create new zones and created some of the zones in-game at a later time. (Note that zones created in-game can only be created one at a time and something like 30 seconds or so should be allowed in between each zone creation). 3. Also the size and number of objects in the zone has an effect as posts above me pointed out. If the zone is located in a city there will more likely not be suitable spaces for waypoints to be created Thees are just my observations, and those smarter than me are welcome to correct if anything I said is wrong or I missed something ;)
  24. So the problem is that the chopper doesn't take off/ doMove doesn't do anything? Have you tried creating a waypoint instead like this?: (Haven't tested it myself but maybe worth trying) _heliGroup = group heli1; _wp = _heliGroup addWaypoint [getMarkerPos "ar1", 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "CARELESS"; Also this might be helpfull in the debug consol to see if there are any waypoints assigned at the moment (group heli1) currentWaypoint;
  25. This is shaping up to pretty much the ultimate heli attack script! I am at work now but i'll try the script when I get home. Helicopter behavior seems a bit arbitrary at times but I look forward to see how well this works! Thanks alot for your help!
×