Frictional Games Forum (read-only)
Connecting entities - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Connecting entities (/thread-24484.html)



Connecting entities - OriginalUsername - 01-29-2014

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?


RE: Connecting entities - FlawlessHappiness - 01-29-2014

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


RE: Connecting entities - OriginalUsername - 01-29-2014

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.


RE: Connecting entities - Daemian - 01-30-2014

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"); 



RE: Connecting entities - FlawlessHappiness - 01-30-2014

(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.


RE: Connecting entities - OriginalUsername - 02-06-2014

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?