Home   Help Search Login Register  

Author Topic: Sorry about this guys  (Read 721 times)

0 Members and 1 Guest are viewing this topic.

Offline Davies1

  • Members
  • *
  • Bugger this for a game of soldiers!
Sorry about this guys
« on: 18 Sep 2005, 13:57:10 »
Im mucking about with some new uk desert units, one has an m203 loaded with flares or smoke shells

can i make a trigger act as an array to detect what is fired, be it a smoke shell from the launcher, or flare and effectively use this synchronised with waypoints for reinforcements, or failing that use it to mark a position for COC artillery to fire at.

I suppose that to use this array to call in a heli rescue it would be in conjucntion with getpos 'player' or etc

 :'(

sorry ive been off ofp for a while and its probably somehwere in the editors depot
Beer is the fuel for the Heavy Metal Engine.

Offline 456820

  • Contributing Member
  • **
Re:Sorry about this guys
« Reply #1 on: 18 Sep 2005, 14:28:57 »
well you would need to use an Event handler more precisely a fired Event handler
theres a tut in the ed depot have a look at it.
then you will need to find out what was fired i think its something like

_muzzletype = _this select 2

? _muzzletype == "M16Grenadelauncher" : goto "event"
Exit

#event
what ever you want here

thats not guaranteed but its something along those lines
hope that helps a bit

bored_onion

  • Guest
Re:Sorry about this guys
« Reply #2 on: 18 Sep 2005, 14:59:36 »
putting this in the init field of the unit who is firing will tell you what they fired.

Code: [Select]
this addeventhandler ["fired",{hint format ["Name of shot is: %1,%2", (_this select 2),(_this select 4)]}]
im a little confused about what else you want to do. do you want to make firing a weapon trigger reinforcements or have i read it wrong?

check out the eventhandler tutorial in the editors depot for more details.
« Last Edit: 18 Sep 2005, 15:00:34 by bored_onion »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Sorry about this guys
« Reply #3 on: 18 Sep 2005, 15:31:42 »
Just for info;

there's a script called: OnFlare.sqs

This script will be executed automatically if it exists in your mission folder, whenever a flare has been fired.

What the script contains is up to you.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Davies1

  • Members
  • *
  • Bugger this for a game of soldiers!
Re:Sorry about this guys
« Reply #4 on: 20 Sep 2005, 18:41:02 »
dudes, cheers for the help, i want to detect the flare/smoke etc just to trigger off an event, i can link what you told me with normal editor triggers to create the effect, waypoints, or chopper extractions,
Beer is the fuel for the Heavy Metal Engine.