Home   Help Search Login Register  

Author Topic: incoming!!!  (Read 910 times)

0 Members and 1 Guest are viewing this topic.

BUNTRO

  • Guest
incoming!!!
« on: 30 Dec 2002, 09:16:32 »
is it possible to make a script to warn of an incoming missle or rocket?  i.e. a player is in a chopper and a SAM missle is launched from a random position.  A warning siren goes off while something flashes on the screen.  In this script, I am also wondering if it is possible to find the position of the missle/rocket from the player and track it in real time.  Is this possible?  Thanks

BUNTRO

Offline Ruprt

  • Members
  • *
    • Ruprtova poradna k OFP
Re:incoming!!!
« Reply #1 on: 30 Dec 2002, 18:52:56 »
Yes, it is possible. You have to add an EventHandler "IncomingMissile" into your script (best way is into init.sqs) :

chopperName addEventHandler ["IncomingMissile",{_this exec "myscript.sqs"}]

The myscript.sqs (script's name is irrelevant) gets 3 arguments from this handler :
1. _this Select 0 = name of the chopper
2. _this Select 1 = type of approaching missile/ammo
3. _this Select 2 = name of a shooter which has shot off the missile

The EventHandler calls myscript.sqs right away after the shooter shoots off the missile. Therefor you can place into the script any possible code, which will alert the pilot of an incoming missile and locates the shooter as well.
Unfortunately missiles are so fast that would be very hard to react even if you know that some danger is coming.

But I'm afraid it's impossible to track the missile during its flight, because there's no way how to get an object name of that missile and therefor you couldn't use GetPos, Position or Distance command (just my opinion, I haven't tried it).
« Last Edit: 30 Dec 2002, 22:25:33 by Ruprt »

BUNTRO

  • Guest
Re:incoming!!!
« Reply #2 on: 30 Dec 2002, 22:49:53 »
The reason I asked this question is because I just modeled a phalanx weapon system which is used to shoot down incoming missiles and aircraft up to a certain range.  This would be useful for such vehicles as an aircraft carrier or a battleship.   I'm not quite sure what platform they are on, but I have seen plenty of pictures.  Attached is what I have modeled. If anyone has any ideas, let me know!  Thanks for the help Ruprt! :thumbsup:

BUNTRO

Offline Ruprt

  • Members
  • *
    • Ruprtova poradna k OFP
Re:incoming!!!
« Reply #3 on: 31 Dec 2002, 13:11:55 »
Wow. I looked at your model and at some pictures of real Phalanx CIWS and I've got to say your model looks like real one. And because I like it, I dived into the problem regarding the missile tracking and now I can say that even this is possible.
I won't be sitting at my comp today because of New year eve and tommorow my brain will be totaly cleared (hangover is a bi...  :-\ ), so I think the day after tommorow I should have a solution for you.
Happy new year wishes Ruprt
« Last Edit: 31 Dec 2002, 13:13:42 by Ruprt »

BUNTRO

  • Guest
Re:incoming!!!
« Reply #4 on: 31 Dec 2002, 18:33:10 »
Thanks a bunch Ruprt!  I think this could be very interesting for the community and that we could really make some cool sh** with this research.  Oh...and btw...all the stuff on the model was done by hand from the making of the model to the texture.  All done by eyeball!   ;)  I'll be looking forward to hearing from you.  Have a safe and happy New Year!!

BUNTRO ;D

BUNTRO

  • Guest
Re:incoming!!!
« Reply #5 on: 01 Jan 2003, 02:34:43 »
I was bored again today and made another model of a sea sparrow launcher.  I don't have any pictures to post at this moment, but I will have some in the future.

BUNTRO

Offline Ruprt

  • Members
  • *
    • Ruprtova poradna k OFP
Re:incoming!!!
« Reply #6 on: 02 Jan 2003, 16:04:35 »
So... I have it already  8). See the attachment and read the readme.txt file. The sample mission in the attachment is the simpliest way how to display data about an incoming missile. There's no problem to make a much better appearance by little more scripting.
Let me know if it is what you are looked for, but I hope it is.

By the way... I admire everyone who is able to make models. I have also tried it but the result was terrible  :-\ so I decided that would be better to never try it again. Grafics and me == bad combination  :-[.

Let me know pls when your AddOn could be completed.