Jump to content

Mr.clean132

Member
  • Content Count

    6
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Mr.clean132

  • Rank
    Rookie

Profile Information

  • Gender
    Male
  1. Unfortunately, this won't work for my situation, as it involves a lot of assets, and it's crucial the ai are constantly respawning, exactly how the Spawn ai module does it.
  2. Hi, I was hoping someone could help me setup a system to add customizations to vehicles (camo nets, bags, tracks, or change the camouflage) in a trigger. I have a mission using the spawn AI module, but I can't find a way to add customizations to vehicles through the spawn ai module, so I figured a trigger would be the next best way. In my mission, the vehicles spawn inside this trigger, and I figure you could have the trigger apply certain presets to them. I tried scripting this myself, but I'm very new to this and got stuck. What i tried was setting the trigger activation to: Any player, not present, repeatable (this is so that if a player drives their vehicle through the trigger it doesn't apply the customizations to their vehicle, only ai vehicles.) My condition field is: this && ({_x isKindOf "O_MBT_02_cannon_F"} count thisList >0); the trigger interval is 2 seconds, and the activation field is: {[ _x,[],["showCamonetHull",1,"showCamonetTurret",1,"showLog",1]] call BIS_fnc_initVehicle;} forEach thisList; I assume something with the condition isn't working, as I'm not really sure how to properly set up that. This was my test version, ideally, it would work for multiple vehicle types, like APCs and tanks. I was also hoping to maybe make it randomize the preset, like have a few presets per vehicle and have it pick one to apply, although, getting it to work at all would be nice. Thanks in advance
  3. Mr.clean132

    Help deleting object mid-mission

    This is perfect, thanks for the help! This also works perfectly, thank you! i was trying almost this exact thing earlier but i may have mistyped something or misplaced a ";", either way, that fixed it. thank you
  4. Hey, I'm very new to scripting and am having trouble with something. I am making a multiplayer pvp/pve mission, and I want players to be able to call in an arsenal on their position when they need it. So I've used the base game "Supply drop support" to accomplish this, with the "crate init" field using this: ["AmmoboxInit",[_this,true]] call BIS_fnc_arsenal; 0 spawn { sleep 30; }; Now the arsenal bit works perfectly, but I also want the crate to be deleted/destroyed after a set amount of time, to prevent them being everywhere, and also limit players ability to exploit having an arsenal beside them. I've tried a few different methods to do this, and looked online quite a bit, but can't figure it out. Im certain its something small I'm messing it up, but either way i cant figure it out. i've tried putting things like "deleteVehicle _this" and using a "_this setDamage 1" to break or delete the crate, with no luck. the error messages also dont make much sense to me, so any help is appreciated. (In the "sleep" area is where ive been putting the delete commands) As a side note, if anyone could help me easily delete the normal contents of the crate via scripting that would also be appreciated
  5. sorry for the late reply, I forgot to reply after testing this. but thank you very much, this fixed it.
  6. Hi, I'm pretty new to scripting/coding and have largely been stalking the forums and repurposing other people's codes to get stuff to work for my personal missions. I have a tank control script that works perfectly in single-player/when there is only one player per side, but when there are 2 people on the same team, it seems to give control of the created group to the other person. I'm not sure how to fix it, I've looked online but can't seem to find anything. I could always go back to having a unit recruitment script but for my dedicated tank pvp mission I thought this would be better, so any help getting it working would be appreciated. (if it makes any difference, I'm hosting this as a multiplayer game from my PC) the script is this, placed in the init of each vehicle I want the script to apply to. this addEventHandler ["GetIn", { _tank = _this select 0; _unit = _this select 2; If(isplayer _unit) then { createVehicleCrew _tank; crew _tank select {!isplayer _x} joinSilent group player; } ; }] ; this addEventHandler ["GetOut", { _tank = _this select 0; _role = _this select 1; _unit = _this select 2; If(_role != "cargo")then { If(isplayer _unit) then { {deleteVehicle _x;} forEach crew _tank; } else { deleteVehicle _unit; }; }; }]; this is the script I have in the vehicle respawn modules expression field: _this select 0 addEventHandler ["GetIn", { _tank = _this select 0; _unit = _this select 2; If(isplayer _unit) then { createVehicleCrew _tank; crew _tank select {!isplayer _x} joinSilent group player; } ; }] ; _this select 0 addEventHandler ["GetOut", { _tank = _this select 0; _role = _this select 1; _unit = _this select 2; If(_role != "cargo")then { If(isplayer _unit) then { {deleteVehicle _x;} forEach crew _tank; } else { deleteVehicle _unit; }; }; }];
×