SWIFT88 0 Posted November 28, 2004 Basically... I want to know when the unit is killed... Can i replace the model which was currently around with a different model which is signifys a wreck... i thought i doing this "killed",{_this exec "playerKilled.sqs"}; however im not sure how to carry on once ive got to disapear one model and make one appear Share this post Link to post Share on other sites
bn880 5 Posted November 28, 2004 Must attach something to "dammaged" and "hit" EH's. Later examine damage if it is 1. Careful, in some situations this may not work perfectly... Share this post Link to post Share on other sites
csj 0 Posted November 29, 2004 class EventHandlers { killed = "[_this select 0] exec ""\yourmodel\playerKilled.sqs"" "; }; or did you mean in mission editor? Share this post Link to post Share on other sites
Footmunch 0 Posted November 29, 2004 Basically... I want to know when the unit is killed... Can i replace the model which was currently around with a different model which is signifys a wreck...i thought i doing this "killed",{_this exec "playerKilled.sqs"}; however im not sure how to carry on once ive got to disapear one model and make one appear Get the position _and_ direction of the original tank using getpos and getdir, then deleteVehicle on it. Then, createVehicle the new unit, and position and direct it using the values. You'll need the 'wreck' defined in the config so that it can be created, rather than just a p3d file. Since there's a little 'hitch' when createVehicle happens, it's often a good idea to create it somewhere far away, _then_ swap the models, so that there's not a few ticks of 'emptiness'. Also, if you need to, eject the crew by looping over the crew of the 'old' vehicle, and doMove "eject" on each one. Share this post Link to post Share on other sites
orson 0 Posted November 29, 2004 Hey fellas I used FAB's tank burning script once upon a time . .. i remember it being the first time i had seen this trickery...and thought it was going to be the norm as no one like seeing the crumpled mess that Ofp leaves as a wreck. But i have been informed that its a no go for MP Would it be possible to use a script that catches the tank just before it blows .... to chuck out the crew and empty any fuel and ammo .... and lock it , leaving the blackened original vehicle with smoke and fire effects ? And also to make it indestructable so that further hits do not crumple it . Share this post Link to post Share on other sites
tankieboy 0 Posted November 29, 2004 Where do people get this idea that crews are blown from their vehicles when hit. Ah yes Hollywood. Share this post Link to post Share on other sites
SWIFT88 0 Posted November 29, 2004 deletevehicle _UKF_Warrior _UKF_Warrior = "UKF_WarriorDES" _UKF_Wreck = "UKF_Wreck" createvehicle [0,0,0] exit just wanna get the change of model before i will add the pretty effects Share this post Link to post Share on other sites
Footmunch 0 Posted December 1, 2004 Swift - Are you still having problems? If you use the event handler like CSJ suggested, then your sqs should look something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; Get the original apc as passed by the EH _warrior = _this select 0 ; Get the position and direction _pos = getpos _warrior _dir = direction _warrior ; Create the wreck _wreck = "UKF_Wreck" createVehicle[0,0,0] ; Kill the original apc deleteVehicle _warrior ; Position and direct the wreck _wreck setpos _pos _wreck setdir _dir ; Call the fire and debris effects with the wreck [_wreck] exec {addeffects.sqs} exit Share this post Link to post Share on other sites
orson 0 Posted December 2, 2004 Hmm , time to come clean.. As a team we dont have experience in getting armoured addons in game.. We are trying to get the UKF Warrior out for christmas and scripting aside .. i have to say that at the mo it handles like a sack of shit in game ... there are lots of things that need changing in the .cfg  I / We need someone who is experienced in getting armoured units into Ofp . Reply to this post or via PM if you are interested . Cheers (sorry to hijack the thread Swifty but its for the same ends and time is limited ) Share this post Link to post Share on other sites