Jump to content
Sign in to follow this  
Bitchmaker

Need a fix: teleporter script disrupting objects

Recommended Posts

Hi. I have created a multiplayer coop mission that uses many teleporters to simulate entering and leaving underground bunkers.  The teleporters work fine except for the fact that when characters use them and arrive in a room with many objects (such as furniture, monitor screens, supplies, etc.), those objects immediately fly all over the room in a giant disordered mess.  The players do not actually come in contact with the objects; their arrival into the room seems to be the cause (even objects 20 meters away will be disrupted).  All of the objects in question have 'enable simulation' and 'enable damage' unchecked. I have no idea why this is happening.  Anyone have a clue?

Not sure if it matters, but the teleport script I am using runs in the init of a bunker object and looks like this: 

this addAction ["Exit the Habitat", {  
(_this select 1) setPos (getMarkerPos "entrance1");  
}];

Thanks!!

Added info: using Zeus to teleport players into the rooms also causes the objects to be disrupted.  Evidently, it's not just the script.

Share this post


Link to post
Share on other sites

Any time I place decorative objects or objects with any possibility of being "accidentally" moved/knocked over, I lock them in place.

 

Place a game logic/invisible helipad/whatever anywhere you want. This is just an immovable object that no one will ever see. Name it - I generally name it "anchor_01". 

 

As you place new objects, paste this snippet in their init field :

[this, anchor_01] call BIS_fnc_attachToRelative; 

No more chaos!

  • Like 4

Share this post


Link to post
Share on other sites

Harzach, that's amazing!  I've never heard of this function before.  Thanks so much for the info.  I'll edit the mission tonite and let you know how it works out.

Share this post


Link to post
Share on other sites
16 minutes ago, Harzach said:

Any time I place decorative objects or objects with any possibility of being "accidentally" moved/knocked over, I lock them in place.

 

Place a game logic/invisible helipad/whatever anywhere you want. Name it - I generally name it "anchor_01". 

 

As you place new objects, paste this snippet in their init field :


[this, anchor_01] call BIS_fnc_attachToRelative; 

No more chaos!

 Harzach, Im getting the following error message:

'...anchor_01] call  BIS_fnc_attachToRelative|#|; }'
Error Missing ;

Any ideas why (gonna go out on a limb and say I did something wrong 🙂  )?

 

Share this post


Link to post
Share on other sites
14 minutes ago, Bitchmaker said:

Any ideas why (gonna go out on a limb and say I did something wrong 🙂  )?

 

Not your fault, it's the forum copy/paste bug. Best practice is to type things out yourself, or at least do a quick check by re-pasting any code into a code block here to see if there are any corrupted characters, see here:


YweEkVK.png

 

Any red dots indicate a corrupted character.

  • Like 2

Share this post


Link to post
Share on other sites

Harzach, this fixed the problem. My mission is now chaos free! Thank you, thank you, thank you!
 

  • Like 2
  • Haha 1

Share this post


Link to post
Share on other sites
3 hours ago, Grumpy Old Man said:

Nice, never seen that one.

 

Cheers

 

I think it's one of KK's babies.

Share this post


Link to post
Share on other sites
12 minutes ago, Harzach said:

 

I think it's one of KK's babies.

No surprise, don't know a function that didn't receive his treatment,  heh.

Good work, he did.

 

Cheers

  • Like 1

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  

×