Home   Help Search Login Register  

Author Topic: getpos/setpos..wtf?  (Read 668 times)

0 Members and 1 Guest are viewing this topic.

veston pants

  • Guest
getpos/setpos..wtf?
« on: 02 Sep 2004, 20:12:09 »
Hello all :)

Practising mission building has filled alot of my time over the last week or so, but unfortunately I've hit a snag.
As an experiment I've placed a player unit on a map, with a light bulb in a building, i want to elevate the lightbulb to ceiling height and understand that I have to use getpos/setpos commands on the light in order to place it correctly. Unfortunately, how to implement these commands in order to gain the info. to correctly place the light is escaping me (and it's drivin me up the frickin' wall)

Can any of you kind and knowledgable peeps explain?, or just give me a tute that explains it with the least amount of jargon as is poss?

Ta very much.. :)

Offline sim

  • Members
  • *
  • Hot! Real hot! Damn Hot!
Re:getpos/setpos..wtf?
« Reply #1 on: 02 Sep 2004, 20:14:27 »
hey

Init field of the lightbuld : "this setpos [(getpos this select 0),(getpos this select 1),+5]"

(without quote marks)  ;)

Right the should work.. i hope  ::) :P Just change the +5 to the amount of metres up to the ceiling...  :)

sim
« Last Edit: 02 Sep 2004, 20:14:56 by sim »
The Unsung Campaign Team Leader

veston pants

  • Guest
Re:getpos/setpos..wtf?
« Reply #2 on: 02 Sep 2004, 21:10:51 »
Thanks Sim.
You couldn't give me the name of the tute you used to learn the how's/why's of how these commands w*rk could you plz fella?

muchly appreciakatered... ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:getpos/setpos..wtf?
« Reply #3 on: 02 Sep 2004, 21:35:38 »
My two tips are, get familiar with all of the tutorials in the getting started section:  and read through the comref like a book.   Don't stop to understand everything, just read through.   Online version is best because it has helpful comments.
Plenty of reviewed ArmA missions for you to play

veston pants

  • Guest
Re:getpos/setpos..wtf?
« Reply #4 on: 03 Sep 2004, 15:16:49 »
Cheers Mac.
I've read a heap of tutes-unfortunately crammin all the info into my tiny noggin is the complikatered bit  :P
I noted that a number of tutes are marked for deletion, are these still valid to use?, and a number of links to DL's with certain tutes are dead aswell  :(

In your list of tutes to try you've got Robs CSV (I think its the only CSV tute available), it unfortunately doesn't seem to be user friendly, and I was wondering if there are anymore tutes on this and what it does exactly?

Finally, a mission question, issit possible to spawn units in a SP mission via triggers, as opposed to placing all your units with their WP's, I just wanna know if you can add elements of surprise using this, alongside possibility of presence, yes or no will do  :)

Thanx for your time  :)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:getpos/setpos..wtf?
« Reply #5 on: 03 Sep 2004, 16:40:15 »
Yeah, there is a lot to take in at first.  You just need to keep plugging away and it quickly makes more and more sense.

Tutes marked for deletion are mostly both old and not very good.    Basically ignore them.   There are many dead links to external sites, there's not much we can do.   Try google but don't hold your breath.   If you find a dead internal ofpec link post it on the appropriate Depot Comments board.

Stringtable is useful rather than vital.    It's main use is in cutscenes:  when you use a "say" command the sound file is played and also the text, stored in stringtable.csv is displayed.   Don't worry about it till you want to use sound files anyway, then get a mission with sound and copy the relevant bits.

To create units during a mission use createVehicle, createUnit or camCreate commands, depending on what you want.     In general OFP code can be used freely in triggers, scripts, waypoints, init lines and so on.
Plenty of reviewed ArmA missions for you to play