Home   Help Search Login Register  

Author Topic: Can someone explain this thing to me?  (Read 832 times)

0 Members and 1 Guest are viewing this topic.

Harnu

  • Guest
Can someone explain this thing to me?
« on: 30 Oct 2002, 03:09:26 »
boom = "flarered" camcreate [getpos z select 0, getpos z select 1, getpos z select 2]

  Okay, I somewhat know how this crap works.  in this instance I have a red flare being created at z (A cessna).  Now,  what do I add or change to make something be created to the left or right or somewhere other than the the plane.  And I don't mean removing "getpost z select 2", I need that for it still being around the plane.  I just want to offset it a bit to the left or to the right.

  Hope someone can help ;) I have some ideas in mind that I wan't to put into action, but I can't get it right!

Offline 14th_Hoot

  • Members
  • *
  • You domove getpos away from me!
Re:Can someone explain this thing to me?
« Reply #1 on: 30 Oct 2002, 03:49:40 »
Methinks you can play with it a bit. For instance, try the following:

boom = "flarered" camcreate [getpos z select 0, getpos z select 1, 20]

Simply inserting a number instead of the direct height SHOULD put the flare 20 meters directly overtop of the plane. Get it?
Also, I think you can do the following:

boom = "flarered" camcreate [getpos z select 0, getpos z select 1+10, getpos z select 2]

Which should move it on the second axis.

Not sure, but give her a shot! ;)

Hoot out!
What..me worry?

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Can someone explain this thing to me?
« Reply #2 on: 30 Oct 2002, 05:20:13 »
14th_Hoot almost got it, just forgot to add brackets...

boom = "flarered" camcreate [getpos z select 0, (getpos z select 1) + 10, 20]

which will create the flare 10 meter to the northern side of the plane and 20 meters above it. The setpos works in relation to the map. And in order for the flare to get lit, it needs 2 seconds of un-obstructed free fall time, which is about 12-20 meters. So if u have a flying plane, no prob. But if it isn't going north and u wan't it 10 meters ahead of the plane, hmm. And if you wan't it to stay there... bigger hmm. Ah well, tell us and we'll give u more answers  ;)
« Last Edit: 30 Oct 2002, 05:20:54 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Bremmer

  • Guest
Re:Can someone explain this thing to me?
« Reply #3 on: 30 Oct 2002, 10:40:54 »
MI_Fred almost got it, just forgot to correct the z position...  ;)

Quote
boom = "flarered" camcreate [getpos z select 0, (getpos z select 1) + 10, 20]

which will create the flare 10 meter to the northern side of the plane and 20 meters above it.

This code in fact creates the flare at 20m above ground level. In order to create the flare above the object (z) you need to get the actual height of z then add the 20m on top of that. eg.

boom = "flarered" camcreate [getpos z select 0, (getpos z select 1) + 10, (getpos z select 2) + 20]
« Last Edit: 30 Oct 2002, 10:42:38 by Bremmer »