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
Ladder add.. Not working
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#1
Ladder add.. Not working

I want to set an entity interact with a ladder piece (cisternladder) to another ladder piece (ladderplace). I have written the code and it doesn't work...
void OnStart ()
{
    AddUseItemCallback("", "cisternladder", "LadderPlace", "LadderPlace", true);
}
void LadderPlace(string &in asTimer)
{    
    SetEntityActive("LadderArea_1", true);
    SetEntityActive("ladder1", true);
    PlaySoundAtEntity("", "impact_wood_med.snt", "LadderPlace", 0, false);
    RemoveItem("cisternladder");    
}
Any tips?
Cheers

02-20-2013, 10:11 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Ladder add.. Not working

I don't know how to do it, but why did it say
PHP Code: (Select All)
void LadderPlace(string &in asTimer
?
Is there even a timer there?
and why do you place the code
PHP Code: (Select All)
RemoveItem("cisternladder"); 
?
That will remove the ladder.

"Veni, vidi, vici."
"I came, I saw, I conquered."
02-20-2013, 10:25 AM
Find
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#3
RE: Ladder add.. Not working

(02-20-2013, 10:25 AM)JustAnotherPlayer Wrote: I don't know how to do it, but why did it say
PHP Code: (Select All)
void LadderPlace(string &in asTimer
?
Is there even a timer there?
and why do you place the code
PHP Code: (Select All)
RemoveItem("cisternladder"); 
?
That will remove the ladder.

Sorry but i felt a little negativity in that reply, anyway cisternladder is the item, which i am trying to place down as a ladder. The item i interact with that places that ladder piece does not work

02-20-2013, 11:28 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#4
RE: Ladder add.. Not working

This thread should on the development support section. Not here.

On topic : I can't understand your problem. Do you want the ladder exact as the ladder in the cistern ? Or the ladder only ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
02-20-2013, 11:36 AM
Find
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#5
RE: Ladder add.. Not working

I might start again...
I have got a ladder piece from Justine (the object) and you need to attach it to a spot to climb up somewhere. When the player interacts the ladder piece item with the entity it will place the ladder down where it belongs and a ladder area will be enabled

02-20-2013, 11:40 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#6
RE: Ladder add.. Not working

(02-20-2013, 10:11 AM)39Gamer Wrote: I want to set an entity interact with a ladder piece (cisternladder) to another ladder piece (ladderplace). I have written the code and it doesn't work...
void OnStart ()
{
    AddUseItemCallback("", "cisternladder", "LadderPlace", "LadderPlace", true);
}
void LadderPlace(string &in asTimer)
{    
    SetEntityActive("LadderArea_1", true);
    SetEntityActive("ladder1", true);
    PlaySoundAtEntity("", "impact_wood_med.snt", "LadderPlace", 0, false);
    RemoveItem("cisternladder");    
}
Any tips?
Cheers

The "void LadderPlace(string &in asTimer)" should be changed into this:
PHP Code: (Select All)
void LadderPlace(string &in asItemstring &in asEntity)
{
///////// OTHER SCRIPTS


That should do the trick.

[Image: the-cabin-in-the-woods-masked-people.jpg]
02-20-2013, 11:53 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Ladder add.. Not working

This was used somewhere...I don't remember if its on the Original Story or any custom story. I just remember it somewhere...

"Veni, vidi, vici."
"I came, I saw, I conquered."
02-20-2013, 12:19 PM
Find
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#8
RE: Ladder add.. Not working

(02-20-2013, 11:53 AM)No Author Wrote:
(02-20-2013, 10:11 AM)39Gamer Wrote: I want to set an entity interact with a ladder piece (cisternladder) to another ladder piece (ladderplace). I have written the code and it doesn't work...
void OnStart ()
{
    AddUseItemCallback("", "cisternladder", "LadderPlace", "LadderPlace", true);
}
void LadderPlace(string &in asTimer)
{    
    SetEntityActive("LadderArea_1", true);
    SetEntityActive("ladder1", true);
    PlaySoundAtEntity("", "impact_wood_med.snt", "LadderPlace", 0, false);
    RemoveItem("cisternladder");    
}
Any tips?
Cheers

The "void LadderPlace(string &in asTimer)" should be changed into this:
PHP Code: (Select All)
void LadderPlace(string &in asItemstring &in asEntity)
{
///////// OTHER SCRIPTS


That should do the trick.

Ah thanks it worked! But one other thing, the ladder area doesnt work, it enables and the click to climb thing comes up but the player does not climb. The ladder area and the ladders are up against a water reservoir if that may be the issue...

02-21-2013, 06:06 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#9
RE: Ladder add.. Not working

You probably just have it placed wrong. Here's a video I found on YouTube Smile http://www.youtube.com/watch?v=RmIKTH9YRqk

In Ruins [WIP]
02-21-2013, 06:12 AM
Find
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#10
RE: Ladder add.. Not working

Works now, thanks all

02-21-2013, 06:31 AM
Find




Users browsing this thread: 1 Guest(s)