Altsor
-
Content Count
31 -
Joined
-
Last visited
-
Medals
Posts posted by Altsor
-
-
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 {}; }; -
Big fan of DAC! Huge compliments to the original creator Silola and anyone else involved!
I am currently having some consistency problems. Sometimes at startup I get error 7.(waypoints) and a message:
WP search was interupted - zone "zonename" is not suitable for unit type (infantry/helicopter/tracked)It can be different zones at different times and sometimes everything works fine. Also if one zone fails the whole DAC zone creation seems to get aborted.
I have not find any troubleshooting for DAC, can someone tell me what is happening and what I can do about it? Thanks!
Also, is there a limit for number of zones/waypoints that can be loaded at once?EDIT: Found one possible explanation. This error happens when I, the player is standing inside one of the zones. Tried moving out the player outside the zone and the problem dissapeared
-
I'm having some headache related to this post with getting an AI in and out of a vehicle. Not sure if its a bug or what I'm doing wrong.
Situation is the following: I have a hostage that is a member of players group and I order him (in game) into a vehicle and drive to a certain point and order him off. Then we walk into a trigger and the AI should leave my group, get assigned to another empty vehicle and get in as driver. So I try this in the trigger:
[soldier] join grpNull; unassignVehicle soldier; //not sure if needed soldier assignAsDriver truck; [soldier] orderGetIn true;
What happens is soldier will leave my group but then he will just stand still and wont get into the truck. What would prevent him from getting in?
Worth noting is that if soldier wasn't previously in a vehicle he will enter the truck without problems when we enter the trigger area. -
So the opfor you are talking about are the playable units? And the hostage script should trigger only when that opfor is damaged?? I dont understand what you want to do. Can you explain it better?
Opfor - present - repeatedly
condition: (damage p2)>0.1on act: _nul = [] execVM "capturescript.sqf"
The condition needs to have "this" in it as well
condition: this && (damage p2)>0.1
-
After loading BIS defence mission I copied it into mine for testing. I proceeded to preview it with only the defence module bits that BIS had used (I deleted everything of mine). No pop up appeared but no soldier did either
Update!
While watching a youtube video, I saw a comment giving a solution, I asked the person how to exactly do it and he sent me this
http://i.imgur.com/oVo83kh.jpg
It works, kind of. I am no longer getting "no curatored synced". However units still wont spawn.
I tried too using that image with the Zeus stuff and I can't get any AI to spawn. Those of you who got AI to spawn at all, what did you do?
Need help with this script for Spawning a helicopter that attacks player
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Thanks, I added it but the function call is on.act on a trigger so it shouldnt be called until I step into the trigger which would be after init.sqf has run.
I tried adding some variable inside the code to see how far I get. I managed to get through the whole code now on the init and I think also on the call but still no choppers will spawn.