Frictional Games Forum (read-only)

Full Version: Attaching ladder pieces together
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering how do you go about creating a ladder that needs an extra piece attaching before it becomes functional?
You need to have a ladder area in active, use AUIC for attaching ladder, SEA for activating it, SPLA for looking.
(04-11-2013, 03:45 PM)JustAnotherPlayer Wrote: [ -> ]You need to have a ladder area in active, use AUIC for attaching ladder, SEA for activating it, SPLA for looking.


Ok, first of all SEA is Set Entity Active, SPLA is Start player look at, but what is AUIC?

Second, how do you make it so a piece of the ladder is added to the inventory? (you can do that right?)
(04-11-2013, 06:30 PM)serbusfish Wrote: [ -> ]
(04-11-2013, 03:45 PM)JustAnotherPlayer Wrote: [ -> ]You need to have a ladder area in active, use AUIC for attaching ladder, SEA for activating it, SPLA for looking.


Ok, first of all SEA is Set Entity Active, SPLA is Start player look at, but what is AUIC?

Second, how do you make it so a piece of the ladder is added to the inventory? (you can do that right?)

There's a ladder item (that you can pick up and it goes in your inventory) in entities/ptest.
(04-11-2013, 06:43 PM)NaxEla Wrote: [ -> ]
(04-11-2013, 06:30 PM)serbusfish Wrote: [ -> ]
(04-11-2013, 03:45 PM)JustAnotherPlayer Wrote: [ -> ]You need to have a ladder area in active, use AUIC for attaching ladder, SEA for activating it, SPLA for looking.


Ok, first of all SEA is Set Entity Active, SPLA is Start player look at, but what is AUIC?

Second, how do you make it so a piece of the ladder is added to the inventory? (you can do that right?)

There's a ladder item (that you can pick up and it goes in your inventory) in entities/ptest.

Found it, cheers.

EDIT:

Rather than make another thread I have another quick question, I have a lever that unlocks a door, however when I pull the level down to open the door when I let go it pops back up and re-locks the door, how do you stop this happening?
I'm not sure what your script looks like (it would help if you posted it), but this should work fine:
PHP Code:
void OnStart()
{
    
SetEntityConnectionStateChangeCallback("lever_name""LeverStateChange");
}

void LeverStateChange(string &in asEntityint alState)
{
    if(
alState == -1) {
        
SetSwingDoorLocked("door_name"falsetrue);
    }

You might need to change -1 to 1 (I can't remember which value is down and which is up).
For the lever thing,
PHP Code:
void OnStart()
{
SetEntityConnectionStateChangeCallback("LEVERNAME""DoorUnlockLever");
}

void DoorUnlockLever(string &in asEntityint alState)
{
if(
alState == -1)
{
SetSwingDoorLocked("DOORNAME"falsetrue);
}
if(
alState == 0)
{
SetSwingDoorLocked("DOORNAME"truetrue);
}

I think it's like that.

For the ladder thing, (if you still need help, if not, I'm just letting this to be here.)
PHP Code:
void OnStart()
{
AddUseItemCallback("""ITEMTOUSENAME""ENTITYFORUSENAME""LadderAttach"true);
}

void LadderAttach(string &in asItemstring &in asEntity)
{
SetEntityActive("LADDERAREANAME"true);
StartPlayerLookAt("ENTITYTOLOOKNAME"66"");
PlaySoundAtEntity("""05_attach_ladder.snt"0.1ffalse); 
AddTimer(""3.0f"StopPlrLookAt"); //Change the 3.0f to how long you want the player look at time to end. (In Seconds)
}

void StopPlrLookAt(string &in asTimer)
{
StopPlayerLookAt();