Home   Help Search Login Register  

Author Topic: Helo rotor breakup script  (Read 960 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Helo rotor breakup script
« on: 14 Aug 2006, 02:10:21 »
hey, Is there anyway to create a chopper rotor breakup script. Like if the helo rotors touch the ground or a building they will break up and shoot everywhere?



Offline XCess

  • Former Staff
  • ****
Re: Helo rotor breakup script
« Reply #1 on: 14 Aug 2006, 02:38:09 »
Would be a damn nice script, only the lack of getPitch and getBank commands would make it almost if not totally impossible to script. With the proper pitch and bank information you could put a gamelogic on the four apex of the rotors and use

?(objec height <1) || ?((nearestObject logic) distance logic < 1):goto"Break"

Not to sure about the nearestobj command though.
Ofcourse, you could make an addon with the first 4 cargo positions at the 4 apex of the rotor, fill em with logics and get the positions from there.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: Helo rotor breakup script
« Reply #2 on: 14 Aug 2006, 07:02:48 »
ok, well if not that, how would I script sombody dying from walking into and Airplane rotor. Like the cessna.

Offline XCess

  • Former Staff
  • ****
Re: Helo rotor breakup script
« Reply #3 on: 14 Aug 2006, 10:11:36 »
If it was on the ground you could get the distance from the centre of the plane (the position gained by getPos), and the direction the plane is facing, compare the two with some fancy mathmatics which I am absolutely no good at whatsoever, the compare that to the getPos of the nearest man object or defined unit, and if it's close enough run a setdammage and perhaps a little bit of setVelocity for eyecandy.
Would all be in the math.. which ofcourse I'm no good at :p

**edit**
although, again, with a small config edit of the unit you could add a cargo position on the rotor and fill it with a gamelogic (could be done inside the addon automatically so the player can't forget to add them)
I think these kind of faked cargo positions would be a very god idea for future addons, and could add quite a bit of realism to the game. A few times I've had my helo rotors go through an opponent and wished for them to be cut to shreds by them.
« Last Edit: 14 Aug 2006, 10:16:33 by XCess »