Home   Help Search Login Register  

Author Topic: Fuel truck stand still once blown up?  (Read 614 times)

0 Members and 1 Guest are viewing this topic.

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
Fuel truck stand still once blown up?
« on: 24 Nov 2004, 17:57:04 »
Hi!

This is probably an impossible problem to solve, but anyway... If you camcreate a "laserguidedbomb" at the position of a truck when it's "not alive" it flies through the air several yards. Now, is there any way of making the truck stand still during the explosion. It's a fuel truck and I want it to go off real bad once destroyed but I don't want it to move much.

Thx
Weeee...

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re:Fuel truck stand still once blown up?
« Reply #1 on: 24 Nov 2004, 19:33:09 »
This should work:

1.  Make an identical fuel truck "truck2" that has the same azimuth.  Place it far away in a safe place on the map.

2. In your script, after cam creating the bomb, set pos the original truck to 0,0,0, and then setpos truck2 the original position of the fuel truck.  (Remember to getpos the original truck's position before setposing it to 0,0,0).

3. Then setdammage 1 on truck2 so its smoking.

You might have to play with a little delay after the bomb camcreate to insure that the truck2 does not get launched by the explosion.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Fire-Fox

  • Members
  • *
  • Violence is just a friend walking on the right way
Re:Fuel truck stand still once blown up?
« Reply #2 on: 24 Nov 2004, 20:20:40 »
You could also use

fueltruck setvelocity [0, 0, 0]

probably 0.01 seconds after its damage equals 1 (damage fueltruck == 1). This way you would not have to replace your truck by a dummy. It its not working from the start, play a bit with the delay- I know for sure that this works because I had the same problem a couple of days ago ;D.
« Last Edit: 24 Nov 2004, 20:21:49 by Fire-Fox »

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
Re:Fuel truck stand still once blown up?
« Reply #3 on: 25 Nov 2004, 18:24:43 »
Cool, thx guys!
Weeee...

bored_onion

  • Guest
Re:Fuel truck stand still once blown up?
« Reply #4 on: 25 Nov 2004, 20:11:14 »
unless youve already solved it you could try a setpos loop
put this in the init.sqs:

truckpos=getpos truck1

then make a script that says:

truck1 setpos truckpos

on a continual loop with a delay of around 0.01 seconds

sytax not guaranteed and post not relevant unless you need other suggestions

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Fuel truck stand still once blown up?
« Reply #5 on: 25 Nov 2004, 23:07:49 »
I did exactly that (blew up a fuel truck with an LGB) in a cutscene I made a while ago and found exactly the same thing.

To get around it, I used a variation on firefox's method...
It doesn't quite look right if the truck stays exactly still, so I did a bit of fiddling around like this:

truck setvelocity [((velocity truck select 0) + 1)/10, ((velocity truck select 1) + 1)/10, (velocity truck select 2) + 1)/10]

That will still have the truck moving a bit (as it would if you blew it up ;D), but it won't go flying halfway across the island like it normally would... ::)