AI Heli's not disappearing when taken by players

Sarge,

I don't know if I have done something to my code or this is how it is suppose to be and I have tried taking off all my new additions to the server, but it is still doing this.

When I first tested the code, the AI choppers would disappear the moment a player got in them making it so they would respawn instead of letting players have another chopper. For some reason now, this is not happening. If a player manages to force the pilot to land, they can steal the heli and use it til server restart. If this how it is suppose to work, or is it suppose to disappear like I had originally.

What part of the code should I focus looking at if it is suppose to disappear?
 
check your server_objectUpdate.sqf. I assume you included a fix/change for another mod.

Sarge
 
thanks Sarge, never did find the issue, I just rebuilt my entire server and mission files and it works fine now. Something was missing because my file was 6kb bigger after rebuilding
 
Found the issue, i have admin tools running with the object update fix, changing the variable in the admin tools from sarge to tool and making adjustments in my cleanup and objectupdate file resolved everything.
 
Found the issue, i have admin tools running with the object update fix, changing the variable in the admin tools from sarge to tool and making adjustments in my cleanup and objectupdate file resolved everything.


do you think you can elaborate? im having this issue and have no clue how the this file works.
 
In ALL of my spawn vehicle files in the admin tools vehicle folder I replaced:

_spwnveh setVariable ["Sarge",1,true];

with:

_spwnveh setVariable ["Tool",1,true];

In my server_updateObject file, I have this instead of Sarge's verison, this change was only for the Admin Tools and not in the AI install:

if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Tool",0] != 1)) then

In my server_cleanup.fsm, I added an additional section to one of the lines (MINE MAY NOT BE WHAT YOU NEED TO DO, THIS IS DEPENDENT ON THE VERSION YOU ARE RUNNING SO MAKE SURE YOU CHECK OUT SARGE'S INSTALL INFO TO SEE IF YOU NEED TO RUN THE OTHER VERSION AND MAKE IT WORK FOR YOU)

" if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && (vehicle _x getVariable [""Tool"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
 
I have something like this issue BUT it is the other way around , if i use admin tools to spawn a vehicle as soon as i get in it disappears, if i fix the admin tools vehicle spawn i can then get in the vehicle fine but in worried that sarge AI heli will then become usable ie a player can then use the heli until restart

for me its important that players cant use heli from AI, but its useful to spawn a vehicle as admin is this something that is a either or option or do i need to tweak another setting ?
 
as stated above, use 2 different variables. If you have the admin mod running, search for "Sarge" in all the files, and replace it with e.g. "Tool".

See the post above from reactor that exactly describes what you need 2 do.
 
I would like the opposite of this for my players, so that they can keep the heli's or sell them (running Epoch server) to help build the base, how do I make it so helo's don't despawn when someone gets in?
 
I've seen it done on an Epoch server, but they disappear at server restart (so great for taking to the traders to make a few quid) I'd also love to know how to acheive this!
 
Just leave them all set as Sarge including the admin tools one and change this in your server_updateObject file:


if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then[/QUOTE]


The server_updateObject file is what deletes the vehicles, so if you stop it from deleting Sarge vehicles you will be fine.
 
Sorry to ask but could you direct me to his posting? I went to admin tools and used Sarge as a search credential but didn't get anything useful. Thanks!
 
Just leave them all set as Sarge including the admin tools one and change this in your server_updateObject file:


if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then


The server_updateObject file is what deletes the vehicles, so if you stop it from deleting Sarge vehicles you will be fine.[/quote]


Is this what the line looks like before its changed? Sorry to ask, but could you give me a before and after of what the line should look like pls? thanks a lot!! I really want to be able to drive the ai vehicles.
 
Mine is on line 36 of my server_updateobject file, but I run overwatch, so yours may be different.

if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then

is what it should be...
 
Back
Top