Jump to content
Sign in to follow this  
Greyco

Solution wanted

Recommended Posts

Hellow, I'm struggling a bit with a mission I'm making. I was wondering if there are some creative minds here that could suggest a solution.

Situation:

Well I have 4 zodiac boats filled with SpecOps doing a landing under fire.

Problem:

The drivers get killed all the time and the boats go spinning out of control... I want the enemy to fire on the boats since it creates a nice effect but they shouldn't be killing the drivers.

I've been thinking about putting triggers in to make the drivers invincible and turn it off just before they hit the beach but I'm afraid I'm still a bit green behind the ears to work it out properly.

If anyone has another solution it would be greatly appreciated help.gif

Share this post


Link to post
Share on other sites

You could use a trigger, but more than likely the drivers will still die. The event will happen before the trigger is quick enough to fix him if he is damaged.

You could try making all the boat crew captive true, then use a script to move some invis targets along at the side of the boats. The enemy will fire at the invis targets and not directly at the crew. I did something similar with my Operation Storm, US were in a UAZ, but the commies didnt always shoot at it, so in the way to the evac, i added some invis targets so they would fire in the direction. It worked mainly, but sometimes a stray bullet would still hit the captured officer, then mission failed.

Also in the same mission, i moved some invis targets to the bay where we were evaced from in a zodiac, and as we were going out, the sla were firing toward us, so the tracers were visible in the outro.

The 2nd way is probably easier, specialy if you know where the boats are going and landing.

Invis targets, are made by MAP. Think its mapfact.net.

Cheers

GC

Share this post


Link to post
Share on other sites

You can use eventHandlers. Check the Biki.

In an OnHit eventhandler, you can reset the damage of the driver to zero. This is pretty easy, and would greatly reduce drivers dying.

In an OnKilled eventhandler, you can replace the driver with a new one (delete dead driver, create new unit, assign new unit as driver, new driver joins old driver's group, etc.). It will happen so fast the player won't see it. This requires more lines of code.

I'm at work, so I can't provide exact syntax.

Share this post


Link to post
Share on other sites

Not in MP Coop it wouldnt. The servers got too much stuff going on for it to be instant.

Cheers

Gareth

Share this post


Link to post
Share on other sites

setCaptive TRUE for the boats until landed. Script the fire on boats until landed. On a thread on OFPEC, Wolfrug discussed using the hit eventhandler but setting the damage to minus values to help make the unit more durable.

Share this post


Link to post
Share on other sites

Well thanks for the feedback. I'll give it a try the next weekend and will let you know how it worked out.

Share this post


Link to post
Share on other sites

G'day, you could try this,

As said above setcaptive true to your SF guys for the zodiac offense. create an empty CRRC and name it "zodiac"

create an blufor driver for the boat, call him skipper and set his waypoints as normal. add this to his init

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setCaptive true; skipper moveInDriver zodiac;this addEventHandler ["HIT",{(_this select 0) setDamage (-10 * damage (_this select 0));}];

I think this may be the eventhandler MrP was talking about, so check that post out for more info on how it works.

put this in a trigger that covers the landing zone for the SF.

activation: BLUFOR

condition: this

OnAct: {_x setCaptive false} foreach thislist

And for the SLA shooting the Zodiac add this to chosen OPFOR units init;

"unitname" commandFire zodiac

GL

Odin

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  

×