Home   Help Search Login Register  

Author Topic: Suicide explosion  (Read 3032 times)

0 Members and 1 Guest are viewing this topic.

Offline Chrispy

  • Members
  • *
  • You never saw me! ;)
    • Delta Zero
Suicide explosion
« on: 18 Aug 2007, 00:37:38 »
Okay, I'm working on an .sqs thingy for OFP. Basically what I want is an option to suicide yourself.

I know you have to do this to make the action:
this addAction ["Suicide", "suicide.sqs"]

BUT, for the .sqs creation/editting part, I don't know how to make it so that an explosion happens right on the player. I could use the player setdammage 1 but I want an explosion!

Any help? Thanks guys.

Chris :)
Need proof-reading for anything? Need a banner for your upcoming mod? Need a pic for your mission? Hit me up with a message. I have a bit of knowledge in Photoshop and formal/military writing.
Be sure to provide sufficient details when posting what you want requested. Thanks guys!

Offline Rellikki

  • Members
  • *
  • Die-hard OFP player
Re: Suicide explosion
« Reply #1 on: 18 Aug 2007, 00:40:50 »
Use the createVehicle command to create a tank shell or some other explosive at the player's position. List of weapons and ammunition. The magazines under Artillery & Cannon create some good explosions. Here's an example command for the script:

Code: [Select]
_bomb = "Heat73" createvehicle getpos player

Offline Chrispy

  • Members
  • *
  • You never saw me! ;)
    • Delta Zero
Re: Suicide explosion
« Reply #2 on: 18 Aug 2007, 01:49:59 »
Didn't work... Is it because I don't have Res?

Chris
Need proof-reading for anything? Need a banner for your upcoming mod? Need a pic for your mission? Hit me up with a message. I have a bit of knowledge in Photoshop and formal/military writing.
Be sure to provide sufficient details when posting what you want requested. Thanks guys!

Offline schuler

  • Contributing Member
  • **
Re: Suicide explosion
« Reply #3 on: 18 Aug 2007, 11:18:13 »
i dont understand, you want the player to have the option of killing himself and those around him,? if so a simple script and a radio camand should do the trick.. player clicks radio " blowup" or what ever you type for radio and bamm she blows,, even if you dont have Res, and hey res should be on shelves for $9.99 by now  :scratch: ,,, i would think!?!?  i will take the time to give you this if someone doesnt come up with a better idea  :D schuler

Edit , i wouldnt , myself use a sqs , the radio could be like a cell phone and setDammage 1 to your car or truck,, by if you know where the suicide would take place you could ad (object #####) setDammage 4 to house's or a truck or tank. much more dammage!!!!!  all depends on the mission your planing and where you what to 'off yourself!"  lol ,,, but the radio and a small script is the trick on this i think  ;)
« Last Edit: 18 Aug 2007, 11:38:47 by schuler »
Semper Fi

Offline Chrispy

  • Members
  • *
  • You never saw me! ;)
    • Delta Zero
Re: Suicide explosion
« Reply #4 on: 18 Aug 2007, 21:36:50 »
Okay... I'll switch to the radio command thingy then.

So would anyone like to guide me on this one? I pretty much have no knowledge on how to have a radio command trigger the explosion.

Thanks guys.

Chris :)
Need proof-reading for anything? Need a banner for your upcoming mod? Need a pic for your mission? Hit me up with a message. I have a bit of knowledge in Photoshop and formal/military writing.
Be sure to provide sufficient details when posting what you want requested. Thanks guys!

Offline schuler

  • Contributing Member
  • **
Re: Suicide explosion
« Reply #5 on: 19 Aug 2007, 09:58:48 »
hey i'll try it out and post you a sqm. file,, short mission and you can copy it into your mission, give you a readme with instructions on how to copy and paste it to your mission, and the hole 9 yards,, what island are you using? can a car or truck be used for the bomb? i think i can set it up so the player and a truck explowed , u will use the radio to set of the bomb at any time. but i dont know what the after life will be like  :D i'll try to check out what you can do. you really should buy the gold upgrade or res, pack. give me some time to look at this for you! schuler
Semper Fi

Offline schuler

  • Contributing Member
  • **
Re: Suicide explosion
« Reply #6 on: 19 Aug 2007, 14:16:45 »
if this looks like something you want , i can seen more info on how to use it  :)
i added a script of "onplayerkilled" so the ending shows the dammage youve done,
just put in in your ofp / user file and it will come up on island Eden in your editor. not in missions,, ok ?
Semper Fi

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Suicide explosion
« Reply #7 on: 20 Aug 2007, 08:53:28 »
Schuler, don't double post.

If you have something to add after a short period of time modify your post instead of replying to yourself...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Chrispy

  • Members
  • *
  • You never saw me! ;)
    • Delta Zero
Re: Suicide explosion
« Reply #8 on: 22 Aug 2007, 09:09:49 »
It's good bro.

Mind if I edit this, save it as my own, and release it to the Editors' Depot? Don't worry, you'll be definitely creditted. Time to play around now!

Chris :)
Need proof-reading for anything? Need a banner for your upcoming mod? Need a pic for your mission? Hit me up with a message. I have a bit of knowledge in Photoshop and formal/military writing.
Be sure to provide sufficient details when posting what you want requested. Thanks guys!

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Suicide explosion
« Reply #9 on: 22 Aug 2007, 15:10:20 »
I suppose you could realease it but its more of a few lines of code than a whole script. Anyway give it a shot ;)

Offline schuler

  • Contributing Member
  • **
Re: Suicide explosion
« Reply #10 on: 23 Aug 2007, 04:49:01 »
Chris your welcome  :D note i also make it so the player can walk away from the car and use the radio to blow the car and kill himself at the same time! theres lots more u can do with it.
  my pc broke down on me that night i uploaded that sqm  :weeping: my C: drive may be wasted and i'll lose all my info and missions on it plus tons of other stuff  >:(
   cheers schuler
Semper Fi

Offline Chrispy

  • Members
  • *
  • You never saw me! ;)
    • Delta Zero
Re: Suicide explosion
« Reply #11 on: 23 Aug 2007, 06:07:09 »
I couldn't put the explosion thingy on the player - it didn't work! Damn!

Do I have to use a car? Can't it be the player?

Chris
Need proof-reading for anything? Need a banner for your upcoming mod? Need a pic for your mission? Hit me up with a message. I have a bit of knowledge in Photoshop and formal/military writing.
Be sure to provide sufficient details when posting what you want requested. Thanks guys!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Suicide explosion
« Reply #12 on: 23 Aug 2007, 12:25:11 »
try with this slight modification:
Code: [Select]
;Script by MP - markpalmer@hotmail.com
;Based on script created by David Berka (David.Berka@nmi.at) respect is due

;creates a large explosion at an object location, vehicle, infantry etc..
;can be easily modified to accept coords, but you know that already ;-)
;usage: [objectname] exec "explosion.sqs"

_AmmoType = "Shell125"
_Unit = _this select 0

_Explosion = GetPos _Unit

_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = (_Explosion select 2)+1

;two shells at the same space position = immediate BOOM
_tempObj = _AmmoType camCreate[_cx, _cy, _cz]
_tempObj = _AmmoType camCreate[_cx, _cy, _cz]

in the activation field of the radio trigger put:
[vehicle player] exec "explosion.sqs"

note that vehicle player returns the player itself when the player is not into any vehicle, and the corresponding vehicle when the player is in a vehicle.

Offline schuler

  • Contributing Member
  • **
Re: Suicide explosion
« Reply #13 on: 24 Aug 2007, 02:26:35 »
Chris , you may have to change the "onplayerkill" script , my pc is broke so i cant look at it. but open it and change the 'camtarget bomercar' , [i think it is] to player or,,, better to say it this way, anything that says bomber or bombecar just replace it with player.
Semper Fi

Offline Chrispy

  • Members
  • *
  • You never saw me! ;)
    • Delta Zero
Re: Suicide explosion
« Reply #14 on: 27 Sep 2007, 00:12:51 »
Damnit I think I kinda forgot about this topic!

@ Mandoble, the code doesn't work. I get a Generic Error thingy (it's because I don't have Res?).
@ schuler, the onplayerkilled.sqs script? That's only the camera script isn't it?

I'll play around a bit and see what I can do. Is there any way whatsoever I can get an explosion on the player via a trigger in the mission editor (as opposed to .sqs files)? Without Resistance?

Chris :)
Need proof-reading for anything? Need a banner for your upcoming mod? Need a pic for your mission? Hit me up with a message. I have a bit of knowledge in Photoshop and formal/military writing.
Be sure to provide sufficient details when posting what you want requested. Thanks guys!