Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connecting entities
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#1
Connecting entities

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
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?
(This post was last modified: 01-29-2014, 08:12 PM by OriginalUsername.)
01-29-2014, 08:11 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Connecting entities

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

Trying is the first step to success.
(This post was last modified: 01-29-2014, 10:09 PM by FlawlessHappiness.)
01-29-2014, 10:09 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#3
RE: Connecting entities

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.
(This post was last modified: 01-29-2014, 10:27 PM by OriginalUsername.)
01-29-2014, 10:26 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#4
RE: Connecting entities

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: (Select All)
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: (Select All)
RemoveAttachedPropFromProp("invisible_box_mass_2_1""fresh_meat_onrope_1"); 

(This post was last modified: 01-30-2014, 05:32 AM by Daemian.)
01-30-2014, 05:26 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Connecting entities

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

Trying is the first step to success.
01-30-2014, 10:16 AM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#6
RE: Connecting entities

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?
02-06-2014, 02:06 PM
Find




Users browsing this thread: 2 Guest(s)