Jump to content
Sign in to follow this  
magicpanda

Putting objects on tables

Recommended Posts

I've set up a cracking little Sniper HQ camp and I wanted to put a satellite phone on a folding table to be used as the UAV control. The only problem I have is getting the phone briefcase to sit on the table.

Share this post


Link to post
Share on other sites

Thanks very much. Would that be done via a trigger close by or in the objects themselves? The 2 objects are Satellite Phone and Table (small)

Edited by Magicpanda

Share this post


Link to post
Share on other sites

put in either objects init field. offset is in meters.

satphone attachTo [table,[0,0,1]];

Share this post


Link to post
Share on other sites

Hi

Since we are on this topic i thought i would ask this.

I want to create a mission to go and pick up an evidence file and take it back to the extraction from where the chopper files me to the end trigger.

My only problem is that i can't figure out how to pick up the object? i placed it where the enemy is but after i take the enemy out and approach it i have no option in any menu to pick up the obj? also i would like to tie the obj into the end trigger but syncing it simply doesn't work. thank you for your help much appreciated

Share this post


Link to post
Share on other sites
My only problem is that i can't figure out how to pick up the object? i placed it where the enemy is but after i take the enemy out and approach it i have no option in any menu to pick up the obj? also i would like to tie the obj into the end trigger but syncing it simply doesn't work. thank you for your help much appreciated

Here's how to do that:

How to Collect Evidence

Share this post


Link to post
Share on other sites

Can someone tell me what I'm doing wrong here?

I have a similar setup - a satphone trying to put onto a table. Table is called "table1", satphone is called "satphone1". Code in satphone's init:

satphone1 attachTo [table1,[0,0,1]];

I also tried putting "this" in place of satphone1 but nothing is working. The satphone just sits on the ground as per normal. :/

Share this post


Link to post
Share on other sites
bump... anyone?

The attachto command doesn't seem to work on any of the furniture objects, try a garbage can instead.

If you do need it on a table/desk this should work

satphone setpos [(getpos satphone select 0)-2, (getpos satphone select 1), 0.9];

Share this post


Link to post
Share on other sites
The attachto command doesn't seem to work on any of the furniture objects, try a garbage can instead.

If you do need it on a table/desk this should work

satphone setpos [(getpos satphone select 0)-2, (getpos satphone select 1), 0.9];

I am trying to do the same thing. I have a laptop/notebook that I want to place on top of a desk(object) and used the code you posted. It gets on the desk but it hovers above it like 1-2inches. I tried changing 0.9 to lower numbers and it falls under the desk.

Share this post


Link to post
Share on other sites

Instead of

satphone1 attachTo [table1,[0,0,1]];

use this:

satphone1 setPos (table1 modelToWorld [0,0,1]);

Modeltoworld uses the same positioning as attachTo, but it doesn't glue the objects together and should work with just about anything.

Share this post


Link to post
Share on other sites

I need to do some work with that command as it looks quite useful and a good short cut.

Share this post


Link to post
Share on other sites

The modelToWorld command works great but instead of 0,0,1 use 0,0,.4

That, for me, put a map right on the table and it looks natural. Depending on the height of the object you just have to fiddle with the third number.

Share this post


Link to post
Share on other sites

If you need to tweak the z value, then why not just do it in the setpos array right away. ;)

Share this post


Link to post
Share on other sites

this is how I did it

_obj="SmallTable" createVehicle _pos;
_obj setDir _dir;

_objSave="SatPhone" createVehicle getPos _obj;
_objSave setPos [((getPos _obj) select 0),((getPos _obj) select 1),((getPos _obj) select 2)+0.8];
_objSave setDir _dir;
_objSave attachTo [_obj,[((getPos _obj) select 0),((getPos _obj) select 1),((getPos _obj) select 2)+0.8]]; 

the reason I use attachTo is because without it, the satPhone will fall down if it got shot. So i attach the phone to the table, no falling down. It seems the table surface is too slippery :D

Share this post


Link to post
Share on other sites

It's a bit odd as the last line of that script doesn't attach the satphone to the table, it does seem to perform a sort of setpos getpos effect as it says in place even if the table is moved. It actually helps keep the table from moving as well.

Share this post


Link to post
Share on other sites

It seems that the modelToWorld command that worked so well, now does not with patch 1.4....odd. I had it working in all my missions. Now the objects just sit on the ground. Anyone else getting this?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×