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
Attaching ladder pieces together
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#1
Attaching ladder pieces together

I was wondering how do you go about creating a ladder that needs an extra piece attaching before it becomes functional?

04-11-2013, 03:30 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Attaching ladder pieces together

You need to have a ladder area in active, use AUIC for attaching ladder, SEA for activating it, SPLA for looking.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-11-2013, 03:45 PM
Find
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#3
RE: Attaching ladder pieces together

(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
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#4
RE: Attaching ladder pieces together

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

In Ruins [WIP]
04-11-2013, 06:43 PM
Find
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#5
RE: Attaching ladder pieces together

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

(This post was last modified: 04-11-2013, 07:41 PM by serbusfish.)
04-11-2013, 07:37 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#6
RE: Attaching ladder pieces together

I'm not sure what your script looks like (it would help if you posted it), but this should work fine:
PHP Code: (Select All)
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).

In Ruins [WIP]
(This post was last modified: 04-11-2013, 11:12 PM by NaxEla.)
04-11-2013, 11:11 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Attaching ladder pieces together

For the lever thing,
PHP Code: (Select All)
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: (Select All)
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();


"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-12-2013, 04:41 AM by PutraenusAlivius.)
04-12-2013, 04:31 AM
Find




Users browsing this thread: 1 Guest(s)