Jump to content
Sign in to follow this  
Guest

DeleteVehicle causing new problem

Recommended Posts

Guest

Well ive been trying to figure out whats wrong with my script, various units in mg's and other static weapons arent being deleted, well i just discovered they are.....

Deleted units in both static Mg's and spotlights are leaving their physical appearance behind, u can even shoot the left over animated body and it shows blood, but the unit no longer functions at all, - its not even truly there, to confirm this I was able to get into one of these mg's and all the sudden the unit 'frozen' there dissapeared...

I wanted to being this to attention, I dont have time to go thru all of the stuff about posting a bug, but this one really blows my mind, going to have to find a workaround..

Share this post


Link to post
Share on other sites

I'm sure that in OFP you could not delete a unit that's sat in a  gunner, cargo or driver position e.t.c. You had to move them out first, before deleteing?

Share this post


Link to post
Share on other sites

True. I also ran into that once when trying to remove some moving vehicles that were no longer needed. It ended up with the vehicles removed and the units dropped out of the ghost vehicles and kissing the tarmack smile_o.gif

Share this post


Link to post
Share on other sites
True. I also ran into that once when trying to remove some moving vehicles that were no longer needed. It ended up with the vehicles removed and the units dropped out of the ghost vehicles and kissing the tarmack  smile_o.gif

The problem that editing creates is the default static MG's use a unit that is not assigned a name.

The best way to be able to delete the units doing the gunning on the MG's is to create a unit, give it a name, then assign it an empty MG. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit moveInGunner MG1; unit assignAsGunner MG1

...hence the only 'simple' way to delete the unit and leave the MG i know of, is to first create a seperate unit, with a name, then unassign the unit to the MG first, then delete it once it's unassigned.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; In a script..

(gunner MG1) unassignvehicle MG1;

~.01

deletevehicle unit

If you need to get rid of a vehicle and a unit, that has default units (i.e: Opfor UAZ w/MG) I use a trigger or script with this in it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">deleteVehicle (driver vehiclename); deleteVehicle vehiclename

(driver vehiclename) or (gunner vehiclename) identifies the unit assigned as driver or gunner, respectfully. (Ontop of moveInGunner or moveInDriver you have to use 'unit assignAsDriver vehiclename or unit 'unit assignAsGunner vehiclename).

You only change "vehiclename" not "driver" when using it i.e: deletevehicle (driver car1); deletevehicle car1

I just checked to see if you can delete a unit assigned as driver or gunner, via  <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">deletevehicle (driver vehiclename) and <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">deletevehicle (gunner vehiclename)and it leaves the unit in the vehicle.

Did that make any sense at all?  smile_o.gif

edit: forgot to point out you need to create an empty MG.

Share this post


Link to post
Share on other sites
Guest

A simple workaround to delete these units ive found is to just kill them (setdammage 1) then delete, works fine smile_o.gif

@ArmaVidz

All of what you typed was already being done, I know I was not specific in the exact conditions during the 'error' but ya man, all vehicles I use start empty, and unit is assigned as gunner (or driver, commander, etc), actually in this case being a gunner of an Mg whom was moved in via 'MoveInGunner' command

"(driver vehiclename) or (gunner vehiclename) identifies the unit assigned as driver or gunner, respectfully. (Ontop of moveInGunner or moveInDriver you have to use 'unit assignAsDriver vehiclename or unit 'unit assignAsGunner vehiclename). "

Honestly Ive never had a problem accessing the units in vehicles that were merely put in thru 'MoveIn##" command, in fact killing the unit which im doing now then deleting him is done thru (gunner VehicleName) and he was Only gotten in the Mg thru ' unit1 MoveInGunner MG5', never seen an issue there, wiki does not state the requirement of assignAsGunner to be able to access that unit thru the 'gunner' command (or commander, driver, etc) - I only have about 5 huge scripts that run fine checking on units in these same conditions - AssignAs## command (along with OrderGetIn) is specifically designed to physically move units into vehicles in real time, not declare wether or not those units are identifiable thru 'driver,gunner,commander' if this were true, then my script would fail when I kill the 5 units manning static mgs by getting them thru command 'gunner' and having moved them into those weapons thru the command 'MoveInGunner' by itself.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×