iNeo 0 Posted February 16, 2003 Hi, </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">p1 setpos [(getpos guy1 select 0), (getpos guy1 select 1), (getpos guy1 select 2)]<span id='postcolor'> When I use this in a script, p1 gets guy1's position 2D wise, but it doesn't get his height. I guess there's something wrong with the select 2 part of the code? Anyone know what's wrong? *ashamed of a probably silly question* Neo Share this post Link to post Share on other sites
Bullz_eye_on_my_back 0 Posted February 17, 2003 hmm... that looks like that should work. I'm using a script with the exact samething, but works.... Although mine only is dealing with a heli. Is the guy walking on regular ground? If so it might be just zero since he is standing on the ground Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 The guy1 is falling through the sky actually, hehe, I'm trying to make an HALO script. p1 is a parachute, and I can switch its height by using the following. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">p1 setpos [(getpos guy1 select 0), (getpos guy1 select 1), 200]<span id='postcolor'> After the code mentioned in my first code, I have a guy1 moveInDriver p1 code, which works, but the guy looses his height and takes the parachute's height instead. Thanks for trying anyway Share this post Link to post Share on other sites
spencer 0 Posted February 17, 2003 I'd like to know something virtualy the same so I haven't made a new topic... I used to know of a way to set a units height using the init field... It's how people made those bunkers before anyone could actualy make a model and use it in OFP, they would place the sandbag walls at certain heights and it worked well... But I wanna put a machine gun on a roof of a block of flats so how do I do that? I can't remember =(! Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (spencer @ Feb. 17 2003,16:30)</td></tr><tr><td id="QUOTE">I'd like to know something virtualy the same so I haven't made a new topic... I used to know of a way to set a units height using the init field... It's how people made those bunkers before anyone could actualy make a model and use it in OFP, they would place the sandbag walls at certain heights and it worked well... But I wanna put a machine gun on a roof of a block of flats so how do I do that? I can't remember =(!<span id='postcolor'> </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">object1 setpos [(getpos this select 0), (getpos this select 1), height]<span id='postcolor'> Just change object1 to the name of the unit and height to the altitude in meters (e.g. 3). Share this post Link to post Share on other sites
spencer 0 Posted February 17, 2003 Ahh thanks alot! Share this post Link to post Share on other sites
InqWiper 0 Posted February 17, 2003 It seemed to be like this for me before when I played around alot with setpos. When you type object1 setpos [getpos object2 select 0, getpos object2 select 1,getpos object2 select 2] It would take object2´s distance over land and put it into object1´s distance over sea, this would make the object appear lower than you wanted. Im not 100% sure of this but I think thats the problem. Anyway the simple sulotion to this might be to use a simpler code: Object1 setpos getpos Object2. Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Feb. 17 2003,18:13)</td></tr><tr><td id="QUOTE">Anyway the simple sulotion to this might be to use a simpler code: Object1 setpos getpos Object2.<span id='postcolor'> Hey, that actually worked Thanks alot Share this post Link to post Share on other sites