Frictional Games Forum (read-only)

Full Version: Script help! 2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
You forgot to add void before OnStart. So it should be
Code:
void OnStart()
{

}

Same for the OnLeave and OnEnter
(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!
(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()
{


I love that none of you actually give a shit about OnEnter() and OnLeave().
(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.