Jump to content
Sign in to follow this  
namreg

How to place SATCHEL without using a unit to do so

Recommended Posts

is there anywat to place satchel charges without using a unit to do so???

I know the commands to do it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">peperl Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"]

and then to fire :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">peperl action ["TOUCHOFF", peperl]

peperl is the name of my saboteur.

But it takes him too long to place them... and sometimes it passes from 20 secs to 40 secs to place it.... so I wonder if there's anyway to create satchel charges in the correct place in fewer seconds and then touch'em off by a trigger

THANKS

Share this post


Link to post
Share on other sites

My saboteurs do place their satchels instantly, without animation ofcourse...

But.

Add a eventhandler "Fired" to your guy.

then in the script you start from that event

_bomb = nearestObject [_this select 0,_this select 4];

_bomb setPos getPos SomePosition;

Now you have the pipe-bomb at the SomePosition

This will be instant, and no unit will ever visit the place SomePosition to actually place the satchel

now use

peperl action ["TOUCHOFF", peperl]

BOOM!

biggrin_o.gif

[edit]

I do not think it's possible to spawn a pipebomb and then having it touched off.

Maybe a timed one will, hmm.. I'll test.

[edit2]

Nope, didn't

I couldn't get the unit to place a TimeBomb either confused_o.gif

Share this post


Link to post
Share on other sites

Sort of... I'd suggest you use a remote dummy soldier to place a satchel, then move the bomb to where you need it. You can set the timer remotely (setTimer action), but the soldier needs to be within range to instantly touchOff the bomb. The satchel itself can be found using on of the nearObject commands.

You can also use the useWeapon action to place a satchel (works on players too).

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">anyUnit action ["useWeapon",unit1,unit1,index]

anyUnit can be any gameLogic or unit. If the unit is a man, will play the action animation (bend down as if to do something), delaying the action by the time it takes to play the animation (unless that unit is already in that animation state). anyUnit may even be the same as the unit with the satchel (unit1).

unit1 is a unit carrying a satchel charge. The satchel will instantly appear at his feet as if he had placed it. The satchel will belong to him.

index is the index (a number) of the put satchel muzzle. You will need to guess this, although it should always be the same for the same unit with the exact same load. In my test, 6 was the correct index.

Share this post


Link to post
Share on other sites

So, you mean I can add a satchel charge to a game logic and then blow it up whenever I want to?

Share this post


Link to post
Share on other sites

No, but you can use a gamelogic induce the action upon a unit without needing to wait for the action animation. In general, the unit that does the action does not have to be the same one that has the effect.

I've been testing directly having a GL place a satchel, but the satchel does not appear as expected. It does however, get removed from the GL. I'll keep testing.

Share this post


Link to post
Share on other sites

ufff... I was trying to make the saboteur place a satchel charge near a bridge so he could blow it up but he turned crazy running all over the bridge from side to side, and sometimes he stopped in the middle of the bridge and did nothing.

I created 4 waypoints, the first is a waiting waypoint that's activated by a trigger when the bridge's guards die, the 2nd waypoint is at the beginning of the bridge and then, my final solution, I placed a setpos command at that waypoint, so the unit doesn't have to run at it, it jumps in space to that location and places the satchel charge (actually I make him place 5 satchel charges to blow up the bridge) and then I retur him to the beginning of the bridge where is another waypoint that leads him out of the scene.

So, to make it not look so weird whistle.gif I created a cutscene so you can't see the quantum leap happening rofl.gif

And that's all hehe yay.gif

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  

×