Jump to content
Sign in to follow this  
SWIFT88

Tank killed

Recommended Posts

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

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

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
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

Hey fellas smile_o.gif

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 sad_o.gif

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

Where do people get this idea that crews are blown from their vehicles when hit.

Ah yes Hollywood. rock.gif

Share this post


Link to post
Share on other sites

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×