Home   Help Search Login Register  

Author Topic: how do you make smokeshells work?  (Read 2761 times)

0 Members and 1 Guest are viewing this topic.

headshot_snipe

  • Guest
Re:how do you make smokeshells work?
« Reply #15 on: 14 Mar 2004, 21:38:54 »
AAAAAAAAAAAAAAAAAAAHHHHHHH i think i have cracked it!!!

by createvehicule a smokeshell + the JAM_smokeblockthinggy at the same time it works!!! i think... i'll do more testing and do an example mission  ;D

here is the script: not very professional, but it will spawn the smokeshell...

Code: [Select]
_shell = _this select 0
_position = _this select 1

_shell createVehicle [getpos _position select 0, getpos _position select 1,0]
"JAM_SmokeBlockIR" createVehicle [getpos _position select 0, getpos _position select 1,0]

exit

make sure you execute the script with [ "smokeshell" , position] exec ...
beware, if the smokeshell are on the enemies or near them and you shot through the smoke they will advance towards you until they can see you...

[EDIT]

if you are seen by a unit far away before you go near the smokeshell, the unit will fire shots at you randomly, and if you shoot back randomly through the smoke the unit will then fire where the shot came from, so beware of that, if you go in the smokeshell before you are seen than no worries

[EDIT]

Example mission will be updated soon  :D , hopefully ....

« Last Edit: 14 Mar 2004, 22:22:07 by headshot_snipe »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:how do you make smokeshells work?
« Reply #16 on: 14 Mar 2004, 22:10:06 »
You now have one small problem...  ;)

The "JAM_SmokeBlockIR" seems to be now there forever... Because it's an invisible object which AI can't see through (afaik)... You should add somekind of pause in the script like

~60

and then delete the 'blocker'... The 60 seconds may be too short time so you should measure how long aproximately the smoke grenade smokes at full capacity and adjust that pause accordingly...

In that case you also need to name it when you create it so your code should look something like this:

Code: [Select]
_shell = _this select 0
_position = _this select 1
_block = ""

_shell createVehicle [getpos _position select 0, getpos _position select 1,0]
_block = "JAM_SmokeBlockIR" createVehicle [getpos _position select 0, getpos _position select 1,0]

~60

deleteVehicle _block
exit

I hope my syntaxes are even closely right  :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

headshot_snipe

  • Guest
Re:how do you make smokeshells work?
« Reply #17 on: 14 Mar 2004, 22:21:18 »
ah yes, i hadn't thought of that, thx

ok, i've tried deleting it, and it works... thank you very much, its late, i'll continue testing tomoz

Code: [Select]
_shell = _this select 0
_position = _this select 1
_block = ""

_shell createVehicle [getpos _position select 0, getpos _position select 1,0]
_block = "JAM_SmokeBlockIR" createVehicle [getpos _position select 0, getpos _position select 1,0]

~62

deleteVehicle _block

exit

this works, n1 with the syntax Hater, it worked except for timing
« Last Edit: 14 Mar 2004, 22:28:40 by headshot_snipe »