Home   Help Search Login Register  

Author Topic: Flares attatched to a trigger  (Read 690 times)

0 Members and 1 Guest are viewing this topic.

monoloth69

  • Guest
Flares attatched to a trigger
« on: 13 Jan 2003, 03:28:31 »
i have a question regarding:i use a trigger and activation should be whoever you want.size should be whatever

on activation:

Flare = "Flare" camcreate (getpos this select 0, getpos this select 1, getpos this select 2,x)

x being the height you want it.

sometimes this dont work so substitute the 'this' for a name and make a barrel or invisible h and name it to this name and place it where you want the flare to go off.

Flare can be changed to
FlareRed
FlareGreen
and summat else but i isnt sure....;)

I am new to map making/editing blah blah blah, so excuse my ignorance plz.  When i used this in the activation field of a trigger, i sert it to activation by anyone, and repeatedly.  First it said i was missing a (, so i changed it to look like this

Flare = "Flare" camcreate [getpos this select 0, getpos this select 1, getpos this select 2,75]

now i get an error saying

Flare = "Flare" camcreate [getpos this select 0, getpos this select 1, getpos this select 2,75] /#/: 4 elements provided, 3 expected

i am just using player in editor to try and trigger the flares to go off, and when i enter the trigger area, this is what happens, just the error message.  I am working on a map in La Trnag Valley where i will need multiple flares to go off when the enemy enters the area, but so far this is my main sticking point, plz help me out fellas, sorry for being such a n00b

Im have tred everything, still no luck, so i moved this question here instead of leaving it on page 2 ubder Flares, sorry if this is out of line

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Flares attatched to a trigger
« Reply #1 on: 13 Jan 2003, 07:46:43 »
Welcome to the forums, monoloth69

In order to camcreate an object, you need to supply a postion array. You are getting error messages because:
  • A position array has 3 components, not 4 as in your arrays
  • An array needs to have square brackets ( [ ] ), as in your second try there ;)
So taking your second line for example:

Flare = "Flare" camcreate [ getpos this select 0 , getpos this select 1 , getpos this select 2 , 75 ]

I've underlined the 'parts' of your array... if you count them up, you'll notice that there are four 'parts' !
A position array only has 3 (x, y and z co-ordinates). I suggest you try this line here:

Flare = "Flare" camcreate [getpos trig select 0, getpos trig select 1,75]

Where trig is the name of your trigger (make sure you type it's name in the name box as opposed to the text box). That will spawn a flare 75m above the trigger. Just note it NEEDS to be named, as this does not work with a trigger...
« Last Edit: 13 Jan 2003, 07:47:58 by Sui »

monoloth69

  • Guest
Re:Flares attatched to a trigger
« Reply #2 on: 13 Jan 2003, 20:11:58 »
Welcome to the forums, monoloth69

In order to camcreate an object, you need to supply a postion array. You are getting error messages because:
  • A position array has 3 components, not 4 as in your arrays
  • An array needs to have square brackets ( [ ] ), as in your second try there ;)
So taking your second line for example:

Flare = "Flare" camcreate [ getpos this select 0 , getpos this select 1 , getpos this select 2 , 75 ]

I've underlined the 'parts' of your array... if you count them up, you'll notice that there are four 'parts' !
A position array only has 3 (x, y and z co-ordinates). I suggest you try this line here:

Flare = "Flare" camcreate [getpos trig select 0, getpos trig select 1,75]

Where trig is the name of your trigger (make sure you type it's name in the name box as opposed to the text box). That will spawn a flare 75m above the trigger. Just note it NEEDS to be named, as this does not work with a trigger...


Thank you so mmuch for helping me out, i was about to scrap the concept due to frustration!  You explanation works fine, and i have implemented it with no problems.  Once again, thanx a million bro! :cheers: