Home   Help Search Login Register  

Author Topic: game logic explosions?  (Read 526 times)

0 Members and 2 Guests are viewing this topic.

Muddy Waters

  • Guest
game logic explosions?
« on: 24 Oct 2004, 21:24:08 »
is there a line i can type in the int. field of a game logic to make it and explosion? what is it?
I wanna fake some arty fire using triggers and game logics.

Cheers

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:game logic explosions?
« Reply #1 on: 24 Oct 2004, 22:07:24 »
You can use camcreate to create a shell or hand grenade at the point but you may need a script. You should have a look at the editors depo as they have quite a few bombard scripts.

Muddy Waters

  • Guest
Re:game logic explosions?
« Reply #2 on: 24 Oct 2004, 22:26:52 »
camcreate! ok, that could work, how do i write it in so it works? i checked comref, but it doesnÂ't work, im probably doing something wrong, example please!

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:game logic explosions?
« Reply #3 on: 24 Oct 2004, 22:46:09 »
For example:

Code: [Select]
;C0LDSt33L's ultra-incredible grenade Script

_target = _this select 0

_targetx= getpos _target select 0
_targety= getpos _target select 1

_boom = "Grenade" camCreate[_targetx,_targety, 1]

exit

The script should be called thus: [LG1] exec "scriptname.sqs"

This will create one grenade a meter above LG1.

This is a more complicated one:

Code: [Select]
;C0LDSt33L's even more ulta-incredible bombard script

_target = _this select 0
_bombcount = _this select 1

#ReBomb

_targetx= getpos _target select 0
_targety= getpos _target select 1


_targetxx = _targetX -100
_targetyy = _targety -100

_tempBomb = "Grenade" camCreate[_targetxx+random 200,_targetyy + random 200, 1]
~0.01
_tempBomb = objNull

_BombCount= _Bombcount - 1

~0.5

?(_BombCount>0): goto "ReBomb"

canbomb=0

#End

exit


The script is called: [object around which the bombard will focus, number of bombs] exec "bombard script.sqs"

You can play around with this to alter the time between bombs or the area they land on and pretty much anything else, it's fairly self-expanatory.

I'm off to have a cream cheese sandwich now  :P
« Last Edit: 24 Oct 2004, 22:56:13 by C0LDSt33L »

Dubieman

  • Guest
Re:game logic explosions?
« Reply #4 on: 25 Oct 2004, 03:40:02 »
Use one of the many arty scripts here at the ed depot or use one of the three explosion scripts there.

Just type some stuff into the activation of a trigger and put the script in the mission folder and walla, a dozen shells hittin the ground to sim arty. The only real arty is the COC stuff. :)