Jump to content


  • Content count

  • Joined

  • Last visited

  • Medals

Community Reputation

11 Good

About draoth

  • Rank
    Private First Class
  1. _Spawnlocation = _this select 0; //Starting location _Location = player getpos [1.2 * (_Spawnlocation distance2D player),player getRelDir _spawnlocation] ; _Road = [_Location, 1000, []] call BIS_fnc_nearestRoad; _Destination = getPos _Road; This should be correct right?
  2. That's exactly what i need. Thank you for being so active on this forum. I like to learn scripting just by doing something out of the box and figuring out what i need for it. But sometimes i can't seem to figure it out by myself. Thanks again Pierre.
  3. First of all, Thanks everybody for helping me. So if i read this right (I probably didn't), this will create a destination that will be somewhere around the player. But i'd like if the car just drives somewhere trough the 1km area around the player to get to his waypoint that is further away. I'm not that familiar with the vectorFromTo so can you explain how it works? Thanks for your time but this is also not exactly what i meant either. I'd like the vehicle to drive past the player but just to get for example to the other side of the island. (And despawn when it's 3km away from it) I want to make this script so it feels like Altis is populated. Forgive me if i'm just an idiot that doesn't understand what you guys just wrote down, but i'm trying to learn so every explanation is very useful for me to learn.
  4. The Vehicle currently spawns on a road segment minimal 1km away from the player and the driver has a waypoint with safe behaviour on it leading tot a random location on the map.
  5. Hello everyone I'm trying to create a mission where vehicles are constantly driving in the area of the players. I've accomplished it by creating a random vehicle min. 1000m and max. 2000m away from the player. This vehicle then gets a random waypoint somewhere on the map, but this means that they can drive away from the player and they won't even see it making it useless. So is there a way i can make it so the random waypoint will always be sorta crossing the player? (The player just has too hear/see it) If anyone has an idea how i could make this that would be great! Here's a little illustration if my explanation was too vague.
  6. Thanks guys! I lol'd at the wax museum. Have a good day!
  7. Hey panther thanks for your response, I want to create the vehicle with a random amount of units in it. And i don't want them to look the same so i went with createUnit I switched this line : _AI = createVehicle [_AIChoose, position Pris1, [], 0, "CAN_COLLIDE"]; With this line : _AI = _group2 createUnit ["_AIChoose", position Pris1, [], 0, "FORM"]; But now they won't even appear. It doesn't even throw an error. Any idea what i'm doing wrong?: or is there a better way to accomplish what i want to create? Draoth
  8. Hello everyone i'm trying to create a unit that spawns in a vehicle and goes to a random location. But when i spawn the unit with createvehicle it won't move... *I tried waypoints and domove* I've done a lot of trial and error and can't figure it out. It's probably something very stupid since i'm not that familiar with scripTing in general. this is my code that is being called with an addaction: _Location = [] call BIS_fnc_randomPos; _Road = [_Location, 1000, []] call BIS_fnc_nearestRoad; _Destination = getPos _Road; _group = createGroup civilian; _AI = nil; _AI2 = nil; _AI3 = nil; _Pass = selectrandom [1,2,3]; _AIChoose = selectRandom ["C_man_1","C_man_polo_1_F_euro","C_man_polo_6_F_euro","C_Nikos_aged","C_Nikos_aged","C_man_sport_1_F_afro"]; _VEHChoose = selectRandom ["C_Offroad_01_F","C_Offroad_01_repair_F","C_Truck_02_covered_F","C_Truck_02_transport_F","C_Hatchback_01_F","C_Hatchback_01_sport_F","C_SUV_01_F","C_Van_01_transport_F","C_Van_01_box_F","C_Van_01_fuel_F","C_Offroad_02_unarmed_F"]; _veh = createVehicle [_VEHChoose, position Pris1, [], 0,""]; //Add passengers _AI = createVehicle [_AIChoose, position Pris1, [], 0, "CAN_COLLIDE"]; _AI setBehaviour "Aware"; _AI doMove (_Destination); _AI enableSimulation true; if (_Pass > 1) then { _AIChoose = selectRandom ["C_man_1","C_man_polo_1_F_euro","C_man_polo_6_F_euro","C_Nikos_aged","C_Nikos_aged","C_man_sport_1_F_afro"]; _AI2 = createVehicle [_AIChoose, position Pris1, [], 0, "CAN_COLLIDE"]; _AI2 setBehaviour "Aware"; _AI2 enableSimulation true; }; if (_Pass > 2) then { _AIChoose = selectRandom ["C_man_1","C_man_polo_1_F_euro","C_man_polo_6_F_euro","C_Nikos_aged","C_Nikos_aged","C_man_sport_1_F_afro"]; _AI3 = createVehicle [_AIChoose, position Pris1, [], 0, "CAN_COLLIDE"]; _AI3 setBehaviour "Aware"; _AI3 enableSimulation true; }; //Add Movein _AI moveInAny _veh; if (_Pass > 1) then { _AI2 moveInAny _veh; }; if (_Pass > 2) then { _AI3 moveInAny _veh; }; I hope someone can help me with this rookie problem. Draoth
  9. Thank you so much! People like you are the reason i keep scripting. Have a good day!
  10. I made an arrow spinning in 360 degrees. 4 players stand around it. The infinite loop checks at what degree the arrow stops. When it stops it will set a player ActiveP. The only part i need help with is this line. _HITIT = Player1 addMPEventHandler ["MPHit", {if (_this select 4 == ActiveP) then { ETC Is the eventhandler correct? i want to check if the one that shot Player one is the same as ActiveP. That's why i put select 4, which is the instigator. instigator: Object - Person who pulled the trigger https://community.bistudio.com/wiki/Arma_3:_Event_Handlers
  11. They are set in different scripts: //First script Friendlygroup = createGroup west; Enemygroup = createGroup east; //ArrowSpin script that randomizes the first Active while {true} do { //player1 if (ArrowDir >180 && ArrowDir <235) then {ActiveP = Player1}; if (ArrowDir >135 && ArrowDir <180) then {ActiveP = Player1}; //player2 if (ArrowDir >45 && ArrowDir <90) then {ActiveP = Player2}; if (ArrowDir >90 && ArrowDir <45) then {ActiveP = Player2}; //player3 if (ArrowDir >0 && ArrowDir <45) then {ActiveP = Player3}; if (ArrowDir >315 && ArrowDir <360) then {ActiveP = Player3}; //player4 if (ArrowDir >270 && ArrowDir <315) then {ActiveP = Player4}; if (ArrowDir >235 && ArrowDir <275) then {ActiveP = Player4}; Pointer setPos [ getPos ActiveP select 0, getPos ActiveP select 1, 3]; if (Arrowspeed < 1) exitwith {}; sleep 0.1 } I hope you can understand it a little, I know it's messy but i did my best
  12. Hello everybody, I'm working on a script that will change a player his side when he's shot by a certain person. And change the player that shot the other player back. So it will always be a 3v1 The player that is last shot will be called = Active. The eventhandler doesn't work as i hoped it would, because everyone gets changed sides when shot by anyone. I'm pretty certain that the mistake is in the first line, but i'll show it all: _HITIT = Player1 addMPEventHandler ["MPHit", {if (_this select 4 == Active) then { [Active] joinSilent (Friendlygroup); Active setObjectTexture [0, "#(rgb,8,8,3)color(0,0.1,0,1)"]}; Active = Player1; [Active] joinSilent (Enemygroup); Active setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"]; }]; This is done for all 4 players. Thank you for helping someone who has almost no experience in coding howsoever! Draoth
  13. I'm pretty late on this one but if you use playmove instead of switchmove it seems to work. And by the way the sliding thing is pretty fun! if only the camera wouldn't glitch that much...