Home   Help Search Login Register  

Author Topic: bomb1 = "grenade" camCreate getpos ???  (Read 503 times)

0 Members and 1 Guest are viewing this topic.

Offline Tenchu

  • Members
  • *
  • No Comment
bomb1 = "grenade" camCreate getpos ???
« on: 20 Jan 2003, 17:33:42 »
If I had this in a script

bomb1 = "grenade" camCreate getpos target

how would i make it explode 3 metres behind the target

Thanks ;D
There is a time and a place for the use of weapons.
- Miyamoto Musashi, The Book of Five Rings, The Ground Book

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:bomb1 = "grenade" camCreate getpos ???
« Reply #1 on: 20 Jan 2003, 17:43:49 »
bomb1 = "grenade" camCreate [(getpos target select 0) -3,(getpos target select1),(getpos target select 2)]

try that one
Not all is lost.

Offline Skumball

  • Members
  • *
Re:bomb1 = "grenade" camCreate getpos ???
« Reply #2 on: 21 Jan 2003, 14:32:09 »
To get it to always explode behind the target you would need to work it out by using getDir and all sorts of other mathematical stuff that I don't understand  :-\ You could also do it as mentioned above, although if the unit is facing north, that line will create the bomb 3 metres to the left  ;)

Offline Tenchu

  • Members
  • *
  • No Comment
Re:bomb1 = "grenade" camCreate getpos ???
« Reply #3 on: 22 Jan 2003, 14:22:11 »
Thanks guys  ;D

Artak's solution is what i was looking for.

It does not need to explode behind the target, just near enough to damage it and make the player duck lol  ;D

"all sorts of other mathematical stuff that I don't understand" me neither lol

Thanks again
There is a time and a place for the use of weapons.
- Miyamoto Musashi, The Book of Five Rings, The Ground Book