Home   Help Search Login Register  

Author Topic: Suicide bomber script??  (Read 1565 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Suicide bomber script??
« on: 15 Jan 2005, 16:23:32 »
Can someone make a suicidebomber script? I saw something like that in Script-Beta testing forum but it was deleted :'( This script must be like this.. A bomber plane crashes on a ship, simple!

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Suicide bomber script??
« Reply #1 on: 20 Jan 2005, 07:35:00 »
uhh ok


i cant make it for u but i think i know how.



1.make a trigger covering the whole map
2.group it to your plane and set the activasion to not present.
3. in the triggers activasion field put [p1]"exec bomb.sqs"
4.name your plane p1
5.make a script, it should look like this
Code: [Select]
plane = this select 0

lgb = "LaserGuidedBomb"

lgb setpos getpos plane

exit
6. save your script as  bomb.sqs
7.put the script in the folder with you mission.
8. when you play the mission and the plane crashes into the ship, the bomb will detonate.

o i guess i did make it for u

there could be some problems, just post them and try to give me the error message,

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Suicide bomber script??
« Reply #2 on: 20 Jan 2005, 07:36:38 »
oh wait there is a problem i will fix it as soon as possible, that one wont work

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Suicide bomber script??
« Reply #3 on: 20 Jan 2005, 07:40:33 »
plane = this select 0

bomb = "laserguidedbomb" camcreate getpos plane
 
exit




this is the correct script,

dont use the other one


Serial Killer

  • Guest
Re:Suicide bomber script??
« Reply #4 on: 21 Jan 2005, 19:19:23 »
If I'm right, the plane blows up in middle of air :-\ I need to make a plane to crash on the ship

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Suicide bomber script??
« Reply #5 on: 21 Jan 2005, 22:51:31 »
nice try penguin, but it sure as hell isn't that easy... ;D if it were i everything else would be much easier as well

Code: [Select]
_plane = _this select 0
_boat = _this select 1

@sqrt((getpos boat select 0 - getpos plane select 0)^2 + (getpos boat select 1 - getpos plane select 1)^2) <= 75
_plane flyinheight 40

_h = 40
@sqrt((getpos boat select 0 - getpos plane select 0)^2 + (getpos boat select 1 - getpos plane select 1)^2) <= 40

#loop
_plane flyinheight _h
~2
_h = _h - 5
?!alive_plane:"laserguidedbomb" camcreate getpos _plane;exit
goto "loop"

use this by:
creating a waypoint to the ship, that has a waypoint before it
in the waypoint before call the script:
[planename,boatname] exec "kamikazi.sqs"
or whatever you decide to call it

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Suicide bomber script??
« Reply #6 on: 25 Jan 2005, 01:11:21 »
woooooow I dont even know how to start this script since its way too complicated.. thanks to triggerhappy now I know that parameters can be different names in games while it doesnt have to be called the same name in the script.. thanks!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Suicide bomber script??
« Reply #7 on: 25 Jan 2005, 04:03:14 »
i said how to use it...

it only looks complicated, but its only the pythagorian theorem

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Suicide bomber script??
« Reply #8 on: 25 Jan 2005, 06:13:41 »
BEEEFCAKE!!!! (I stole that line from somebody else hehe!)
Ive got an example mission here!
Sorry about the small unrealistic part in this mission.. just a small bit. I didnt need any scripts while I just made 3 scripts. 1 for keeping stuff in place and others for explosion effects. flyinheight and setvelocity seem to work right.
I couldnt make the setvelocity any better since planes dont fly lower than about 5 meters even with their flyinheight on 1. I tried helicopter but they just crashed at the very start of the mission becuase they went too low and when I changed it too high. not fast enough... well heres the mission in non-pbo format for editing attached!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Serial Killer

  • Guest
Re:Suicide bomber script??
« Reply #9 on: 26 Jan 2005, 15:29:48 »
Very good! I'll try it and I say is that usefuly, thanks!

Few minutes later...

Very usefully! That should be good for my mission :D Thanks again!
« Last Edit: 27 Jan 2005, 09:11:31 by Serial Killer »

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Suicide bomber script??
« Reply #10 on: 26 Jan 2005, 20:16:26 »
yay thank you! wew I thought with the "few minutes" later u were gonna say I called it better than it was :S... thanks I appreciate!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Suicide bomber script??
« Reply #11 on: 26 Jan 2005, 20:17:53 »
haha I dont want to be mean to anyone but its funny how every1 is doing scripting while I do some in-game..... functions as its called? :P!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Suicide bomber script??
« Reply #12 on: 27 Jan 2005, 02:06:34 »
scripts are generally better though

with a script (if you're good) you can be in control of every little thing, whereas editor-side commands are less accurrate/controlled

for example, with my script, i could fix it to use set velocity and flyinheight in a loop and take it down gradually, rather than have it jump down. it just would look better, and be more efficient, because of various factors that could change in-game
« Last Edit: 27 Jan 2005, 02:08:23 by Triggerhappy »

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Suicide bomber script??
« Reply #13 on: 27 Jan 2005, 07:08:53 »

Quote
nice try penguin, but it sure as hell isn't that easy...  if it were i everything else would be much easier as well

? worked fine for me,

when the plane hits the ship and is destroyed, the trigger that was covering it sees that the plane is not there or"Not Present" and then activates, this happens very fast and the plane that blew up should be next to the ship when the LGB goes off.  

it does not make the plane try to crash into it it just gives it more destructive power.  Now if he wanted a script that made it try to crash, i have no idea how to make it?