Frictional Games Forum (read-only)

Full Version: Connecting entities
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Title gives it away.
I'm trying to connect two entities who are supposed to move together at the same time, but I really don't know how to do that.
I saw the
Code:
ConnectEntities(string& asName, string& asMainEntity, string& asConnectEntity, bool abInvertStateSent, int alStatesUsed, string& asCallbackFunc);
command, but I don't know how it works.
Could someone help me out?
If you don't know how a script line works, only one way is to try it out Smile

Bool = False/True
String = Any kind of text. Fx. when it's string& asMainEntity, it's probably the name of the main entity.
Int = A single digit number. Usually -1, 0 or 1
Yeah I know how scripting works. I don't ask first, try later. (Like a lot of people seem to do.) I just tried everything and it still doesn't work, and I hoped someone else would know.
But ConnectEntities is for wheels.
I think you're looking for AddAttachedPropToProp.

You can check in 21_torture_nave.hps (line 585)
function name is UseMeatOnRope

How they attach meat to an invisible box on the rope
PHP Code:
AddAttachedPropToProp("invisible_box_mass_2_1""fresh_meat_onrope_1""fresh_meat_onrope.ent"0,0,00,0,0); 

When the rope is down, it enters an area that removes the meat
PHP Code:
RemoveAttachedPropFromProp("invisible_box_mass_2_1""fresh_meat_onrope_1"); 
(01-29-2014, 10:26 PM)OriginalUsername Wrote: [ -> ]Yeah I know how scripting works. I don't ask first, try later. (Like a lot of people seem to do.) I just tried everything and it still doesn't work, and I hoped someone else would know.

I'm sorry. I misinterpreted your post.
It still won't work.
I'm basically trying to connect the handle in the amfp elevator to the pod. I haven't looked too much into the amfp scripts, so I'm not sure how they did it. Could someone help me out?