Frictional Games Forum (read-only)
Ladder add.. Not working - 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: Ladder add.. Not working (/thread-20413.html)



Ladder add.. Not working - 39Games - 02-20-2013

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...
Code:
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


RE: Ladder add.. Not working - PutraenusAlivius - 02-20-2013

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


RE: Ladder add.. Not working - 39Games - 02-20-2013

(02-20-2013, 10:25 AM)JustAnotherPlayer Wrote: I don't know how to do it, but why did it say
PHP Code:
void LadderPlace(string &in asTimer
?
Is there even a timer there?
and why do you place the code
PHP Code:
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


RE: Ladder add.. Not working - No Author - 02-20-2013

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 ?


RE: Ladder add.. Not working - 39Games - 02-20-2013

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


RE: Ladder add.. Not working - No Author - 02-20-2013

(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...
Code:
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:
void LadderPlace(string &in asItemstring &in asEntity)
{
///////// OTHER SCRIPTS


That should do the trick.


RE: Ladder add.. Not working - PutraenusAlivius - 02-20-2013

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


RE: Ladder add.. Not working - 39Games - 02-21-2013

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


RE: Ladder add.. Not working - NaxEla - 02-21-2013

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


RE: Ladder add.. Not working - 39Games - 02-21-2013

Works now, thanks all