Home   Help Search Login Register  

Author Topic: Exploding house  (Read 1526 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Exploding house
« on: 21 Aug 2004, 21:47:11 »
Hi again,

I got an explosion script frm the ed depot where all u need to is put [objectname] exec"explosion.sqs". Now wot i want is for wen a unit enters the house, for the house to explode.

So i find the ID of the house and put [ID 28550] exec"explosion.sqs" but nothing happens?!?

To test the script works i get a jeep, do the same as above and yeh the jeep blows away.

Why wont the house blow up?

Cheers

Gooner

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Exploding house
« Reply #1 on: 21 Aug 2004, 21:51:33 »
hi,

Objectname is not 'ID x'. It's 'object x'.
You've propably got a script that takes the target from the passed info, so try
[object 28550] exec "explosion.sqs" and it should work a bit better.  :)
Not all is lost.

Gooner861

  • Guest
Re:Exploding house
« Reply #2 on: 21 Aug 2004, 22:34:40 »
Hmmmm, i tryed that and it came up with some error about the script.  :-\

Heres the script:

_AmmoType = "Heat120"
_Unit = _this select 0

_Explosion = GetPos _Unit

_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = _Explosion select 2

_tempObj = _AmmoType camCreate[_cx, _cy, _cz]
~0.01
_tempobj = objNull

exit

It says there is an error with
Quote
_tempObj = _AmmoType camCreate[_cx, _cy, _cz]

something about "error type array"

Cheers

Gooner

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Exploding house
« Reply #3 on: 21 Aug 2004, 22:47:36 »
Try changing that to:

_tempObj = _AmmoType camCreate getPos _Unit

If that works then this part is redundant:

_Explosion = GetPos _Unit

_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = _Explosion select 2


Planck
I know a little about a lot, and a lot about a little.

Gooner861

  • Guest
Re:Exploding house
« Reply #4 on: 21 Aug 2004, 22:52:37 »
Ok thanks for the help. Still a problem though. Ok so now there is no error message, but now the problem is there is no explosion?!?

Gooner

Offline Mud_Spike

  • Contributing Member
  • **
Re:Exploding house
« Reply #5 on: 21 Aug 2004, 23:00:24 »
And you are sure you got the correct Id number?

Try the script itself by executing it with:
[player] exec "explosion.sqs"

That should blow you up, if it doesnt, something is wrong with the script,
if it does, the object ID is wrong.

Gooner861

  • Guest
Re:Exploding house
« Reply #6 on: 21 Aug 2004, 23:04:33 »
Nope nothing happens, must be the script.  >:(

Thanks

Gooner

Offline Mud_Spike

  • Contributing Member
  • **
Re:Exploding house
« Reply #7 on: 21 Aug 2004, 23:13:12 »
Then the script probably isnt executed at all.
Did you put it in your mission's folder? (i.e., ....../users/gooner/missions/my_mission/)

Since the script is really just a line or two, you can try putting those lines in the the trigger instead of [....] exec "explosion.sqs" like so:
Code: [Select]
tmp = "heat120" camCreate GetPos object 28550 ; tmp = objNull
If none of this works, something is crap.
« Last Edit: 21 Aug 2004, 23:25:52 by Mud_Spike »

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Exploding house
« Reply #8 on: 21 Aug 2004, 23:20:45 »
are u guys blind????? ???

if im not mistaken, then
Code: [Select]
_tempObj = _AmmoType camCreate[_cx, _cy, _cz] is missing a space after camCreate!!!
re edit the script to the following:
Code: [Select]
_tempObj = _AmmoType camCreate [_cx, _cy, _cz]
you need a space after camCreate. then it should work. ;)
Tyger

"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Exploding house
« Reply #9 on: 21 Aug 2004, 23:29:44 »
That's a crappy script anyway. Could be used much more effiecent and easier with triggers.

Trigg:
cond: this
on act: boom = "heat120" camcreate getpos object XXX

:beat: *Gets Shot* :beat:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Exploding house
« Reply #10 on: 21 Aug 2004, 23:30:30 »
Then why is:

_tempObj = _AmmoType camCreate getPos _Unit

not working either?


Planck
I know a little about a lot, and a lot about a little.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Exploding house
« Reply #11 on: 21 Aug 2004, 23:33:14 »
Just put a GL on the house instead of using this object XXX shite. It allways fecks up. GLs are convienent and trustable.

:beat: *Gets Shot* :beat:

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Exploding house
« Reply #12 on: 21 Aug 2004, 23:37:01 »
are u guys blind????? ???

if im not mistaken, then
Code: [Select]
_tempObj = _AmmoType camCreate[_cx, _cy, _cz] is missing a space after camCreate!!!
re edit the script to the following:
Code: [Select]
_tempObj = _AmmoType camCreate [_cx, _cy, _cz]
you need a space after camCreate. then it should work. ;)
Tyger



It doesn't matter whether you have a space between the command and the array or not. Same goes for the "format" command, and other commands requiring an array.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Gooner861

  • Guest
Re:Exploding house
« Reply #13 on: 21 Aug 2004, 23:48:09 »
Ok now it works lol, i put space in Object28550 and it worked. So much fuss over a space  ;D .

This is for use in a cutscene so wud i just need to put that code into the place i want it in my cutscene?

Not my script, was in ed depot. Works so i may as well use it  ;D .

Cheers

Gooner

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Exploding house
« Reply #14 on: 22 Aug 2004, 00:12:00 »
@General Barron

im pretty sure it does matter! u try it, and i shouldn't work w/o a space.

unless v1.46 requires a space while v1.75 doesn't >:( :P. cant wait for resistance to arrive in the mail. :D
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08