Home   Help Search Login Register  

Author Topic: CamCreate flare script  (Read 1294 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkAngel

  • Members
  • *
  • The night is my friend.
    • DarkAngels Missions
CamCreate flare script
« on: 09 Jul 2007, 13:36:22 »
Hi folks, am probably being really stupid here but for some reason this (very simple) script doesn't work and I wondered if someone could help! The aim is to create a series of flares above preset locations, to add atmosphere to a SF mission I'm working on...grateful for all help!

; flares.sqs
; creates flares at given point

_position_unit = _this select 0
_flare_number = _this select 1



~10

#flares
hint "Loop starting"

_flare1 = "FlareWhite_M203" camCreate [getPos _position_unit select 0, getPos _position_unit select 1, 30]

~20

_flare_number = _flare_number - 1
?_flare_number < 1: goto "end"

goto "flares"

#end

exit
"Moondark" in Beta Testing

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: CamCreate flare script
« Reply #1 on: 09 Jul 2007, 13:38:35 »
Use createVehicle instead of camCreate in ArmA.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: CamCreate flare script
« Reply #2 on: 09 Jul 2007, 13:41:48 »
I had problems with flares last night. Couldn't get a lit one up in the air. Also found nothing on the wiki.
I was trying to get a badguy to fire one with the fire command but he was having none of it.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline DarkAngel

  • Members
  • *
  • The night is my friend.
    • DarkAngels Missions
Re: CamCreate flare script
« Reply #3 on: 09 Jul 2007, 14:01:07 »
This works like a dream - thanks Mandoble! Architect, it's kind of cheating as it just creates the flares rather than having them fired, but am thinking it can be set to a team leader unit who could fire it every time the player is spotted, for example...

; flares.sqs
; creates flares at given point

_launch_unit = _this select 0
_flare_number = _this select 1

~5

#flares

_flare1 = "F_40mm_White" createVehicle [getPos _launch_unit select 0, getPos _launch_unit select 1, 150]

~20

_flare_number = _flare_number - 1
?_flare_number < 1: goto "end"

? getDammage _launch_unit > 0.9: goto "end"

goto "flares"

#end

exit
"Moondark" in Beta Testing

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: CamCreate flare script
« Reply #4 on: 09 Jul 2007, 14:11:40 »
Yeah, I think in future I'll just camcreate
Code: [Select]
createvehicle them.
It's what I normally do, but I dug up an old script that had a guy do it himself. It's what I get for trying be to cute when my normal solution already works just fine.

Cheers guys, the above script can be easily and most heartily pinched.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."