Jump to content

Flightcaptain93

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Flightcaptain93

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Flightcaptain93

    [SOLVED] addMissionEventHandler

    :) no there should be no punishment for killing teammates. the first statement (_this select 1) == player) checks if the killer is an player. the second one (_this select 0) == civilian) if an civilian was killed. if both of them are true my script should be executed. That works... but accidentally the trigger fires when the player killes 2 blufor units.... and that is weird. I dont get why the script does this??? mayby i miss something important?
  2. Flightcaptain93

    [SOLVED] addMissionEventHandler

    if someone (from the players, blufor) is killing a civilian the mission should end as lose. -> that is working the mission also end as lose if someone is teamkilling (blufor). You can kill the first teammate and nothing will happen, but if you kill the second one the mission end also as lose? <- thats my problem...
  3. _civkilled = addMissionEventHandler ["EntityKilled",{if (((_this select 1) == player) && (side (_this select 0) == civilian)) then {[[], "ray_lose_fnc", true, true] call BIS_fnc_MP; [[(_this select 1)], "ray_killer_fnc", true, true] call BIS_fnc_MP; }else{}; }]; I have this type of code... it works correctly. But if i kill the second teammate in the group of the player (blufor) the trigger fires... Thanks :)
  4. Flightcaptain93

    execVM Multiple Times

    Thanks it worked out :) yeah sorry I got a little bit of false understanding... english isnt my mother language. But it worked after i read it correctly :) thanks
  5. Flightcaptain93

    execVM Multiple Times

    okay i did this but i get still the error that _car is not defined in the line after the ray_traffic_fnc; [_car] call ray_traffic_fnc; //here the _car is spawned and get the information from the car _driver = driver _car; /// <---- here is the script error that _car isnt defined...
  6. Flightcaptain93

    execVM Multiple Times

    Thanks :) i removed that
  7. Flightcaptain93

    execVM Multiple Times

    After i switchet the car variable to a local one. _car. The variable _car is first called in my ray_traffic_fnc where the car is spawned... is it possible to give the information about _car into the part of the script after the ray_traffic_fnc?? because now i get the error that the variable _car is not defined... call ray_traffic_fnc; _driver = driver car;
  8. Flightcaptain93

    execVM Multiple Times

    This is the code of the carspawnscript. I have a roadblock with a bargate. If 1 car is standing infront of it the second car has to hold at an other spot. The car holds infront of the bargate and continues driving if the bargate is opend. But if the second car spawn the first won´t continue after i open the gate... if (isServer) then { _cs = (_this select 0); _hpfirst = (_this select 1); _hpsecond = (_this select 2); _dest = (_this select 3); sleep 1; if (firstpoint) then { sleep 5; }; if (firstpoint) then { firstpoint = false; publicvariableserver "firstpoint"; call ray_traffic_fnc; _driver = driver car; _groupd = group _driver; sleep 1; _wp = _groupd addWaypoint [_hpfirst, 0]; _wp setWaypointCombatMode "BLUE"; _wp setWaypointSpeed "Limited"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointtype "MOVE"; waituntil {sleep 1; (((bargate animationPhase "Door_1_rot") == 1) && ((car distance2D bargate) <= 20) && ((speed car) <= 1))}; firstpoint = true; publicvariableserver "firstpoint"; sleep 1; _wp = _groupd addWaypoint [[11509.3,6270.87,0],0]; _wp = _groupd addWaypoint [_dest, 0]; _wp setWaypointCombatMode "BLUE"; _wp setWaypointSpeed "Limited"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointtype "MOVE"; waituntil {(car distance2D _dest) <= 50}; {car deleteVehicleCrew _x} forEach crew car; deletevehicle car; } else { if (secondpoint) then { secondpoint = false; publicvariableserver "secondpoint"; call ray_traffic_fnc; _driver = driver car; _groupd = group _driver; _wp = _groupd addWaypoint [_hpsecond, 0]; _wp setWaypointCombatMode "BLUE"; _wp setWaypointSpeed "Limited"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointtype "MOVE"; waituntil {sleep 1; firstpoint}; _firstpoint = false; _secondpoint = true; publicvariableserver "firstpoint"; publicvariableserver "secondpoint"; sleep 10; _wp = _groupd addWaypoint [_hpfirst, 0]; _wp setWaypointCombatMode "BLUE"; _wp setWaypointSpeed "Limited"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointtype "MOVE"; waituntil {sleep 1; (((bargate animationPhase "Door_1_rot") == 1) && ((car distance2D bargate) <= 20) && ((speed car) <= 1))}; _wp = _groupd addWaypoint [[11509.3,6270.87,0],0]; _firstpoint = true; publicvariableserver "firstpoint"; sleep 1; _wp = _groupd addWaypoint [_dest, 0]; _wp setWaypointCombatMode "BLUE"; _wp setWaypointSpeed "Limited"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointtype "MOVE"; waituntil {(car distance2D _dest) <= 50}; {car deleteVehicleCrew _x} forEach crew car; deletevehicle car; } else { hint "NO SPAWN POSSIBLE"; }; }; }; and the traffic_function ray_traffic_fnc = { _cararray = ["C_truck_02_covered_F","C_offroad_01_F","C_SUV_01_F","I_C_Offroad_02_unarmed_F"]; _carspawn = _cararray call BIS_fnc_selectRandom; car = _carspawn createVehicle _cs; car setdir 180; clearweaponcargoglobal car; clearmagazinecargoglobal car; clearitemcargoglobal car; clearbackpackcargoglobal car; _freePositionscargo = car emptyPositions "cargo"; hint format ["Cargoplaces car: %1",_freePositionscargo]; sleep 2; _comander = car emptyPositions "Commander"; _gunner = car emptyPositions "Gunner"; _comgun = _comander + _gunner; _unitcountcar = _freePositionscargo + _comgun + 1; hint format ["Cargo with driver, gunner etc: %1",_unitcountcar]; sleep 2; _randompassenger = floor (random _unitcountcar); hint format ["Crew (minus): %1",_randompassenger]; sleep 2; _crewnumber = _unitcountcar - _randompassenger; hint format ["Crew (spawn): %1",_crewnumber]; sleep 3; for "_i" from 1 to _crewnumber do { grp = creategroup civilian; _man = grp createUnit ["C_Man_casual_4_F_tanoan", _cs, [], 5, "PRIVATE"]; _needofdriver = car emptyPositions "Driver"; if (_needofdriver == 1) then { _man moveindriver car; } else { _man moveincargo car; }; }; };
  9. Hello :) I have this type of code in one of my missions. for "_i" from 1 to 100 do { _nil = [_cs,_hpfirst,_hpsecond,_dest] execVM "scripts\carspawn.sqf"; _number = floor (random 941) + 60; sleep _number; }; In the script different cars with a different amount of passengers are generated. They get waypoints etc. But i think does once the script startet twice it affect the other script. Is it possible to start the script multiple times without having any influence on each other? I´m new into scripting. Thanks guys.
  10. Flightcaptain93

    [SP/COOP 05] PURPLE NIGHT (Stealth mission)

    :) nice work
  11. Flightcaptain93

    [COOP] All Out Warfare

    :) nice work
  12. Flightcaptain93

    SURVIVAL OPEN WORLD

    great work :)
×