Frictional Games Forum (read-only)
Script help! 2 - 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: Script help! 2 (/thread-22160.html)



Script help! 2 - tezpull666 - 07-17-2013

I did all the scripting:
PHP Code:
OnStart()
{
    
AddUseItemCallback("""key_study_1""level_wood_1""FUNCTION"true);
}

OnEnter()
{

}

OnLeave()
{

}

void FUNCTION(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked("level_wood_1"false);
    
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
    
RemoveItem("key_study_1");


But it said this:
Help2


RE: Script help! 2 - OriginalUsername - 07-17-2013

You forgot to add void before OnStart. So it should be
Code:
void OnStart()
{

}

Same for the OnLeave and OnEnter


RE: Script help! 2 - tezpull666 - 07-17-2013

(07-17-2013, 07:06 PM)Smoke Wrote: You forgot to add void before OnStart. So it should be
Code:
void OnStart()
{

}

Same for the OnLeave and OnEnter
Thanks!


RE: Script help! 2 - Icaab2608 - 07-18-2013

(07-17-2013, 07:04 PM)Mike1265 Wrote: I did all the scripting:
PHP Code:
OnStart()
{
    
AddUseItemCallback("""key_study_1""level_wood_1""FUNCTION"true);
}

OnEnter()
{

}

OnLeave()
{

}

void FUNCTION(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked("level_wood_1"false);
    
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
    
RemoveItem("key_study_1");


But it said this:
Help2
PHP Code:
OnStart()
{
    
AddUseItemCallback("""key_study_1""level_wood_1""FUNCTION"true);
}
void FUNCTION(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked("level_wood_1"false);
    
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
    
RemoveItem("key_study_1");
}
OnEnter()
{

}

OnLeave()
{





RE: Script help! 2 - PutraenusAlivius - 07-18-2013

I love that none of you actually give a shit about OnEnter() and OnLeave().


RE: Script help! 2 - OriginalUsername - 07-18-2013

(07-18-2013, 08:07 AM)JustAnotherPlayer Wrote: I love that none of you actually give a shit about OnEnter() and OnLeave().

He doesn't use them atm, right? Also, he might understand what they're doing and doesn't use them at all.