Frictional Games Forum (read-only)

Full Version: Make player look at entity?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(02-03-2012, 06:59 PM)Datguy5 Wrote: [ -> ]Now it says expected expression value.
Wtf?!
Then post the line where the error occurs at etc.
I can't be arsed to look through the whole thing now to be honest.

////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "And", "Locked", "KeyOnDoor", true);
SetEntityCallbackFunc("And", "OnPickup");
SetEntityCallbackFunc("Antidote", "OnPickup2");
SetEntityPlayerInteractCallback("Antidote", "Win", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "End", "Message2", true, 1);
}


void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup1", 0);
}
void Message2(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup2", 0);
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_1", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked", false, true);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Locked", 0, false);
RemoveItem("And");
}
void OnPickup2(string &in asEntity, string &in type)
{
SetEntityActive("Master", true);
}
void Win(string &in asEntity)
{
StartPlayerLookAt("Master", 3, 5, "");
AddTimer("", 1, "Message_func");
}
void Message_func(string &in asTimer)
{
SetMessage("Messages", "Popup3", 2);
AddTimer("", 2, "CreditStart");
}
void CreditStart(string &in asTimer)
{
StartCredits("ending_daniel.ogg", true, , "Ending", 1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(02-03-2012, 07:16 PM)Datguy5 Wrote: [ -> ]////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "And", "Locked", "KeyOnDoor", true);
SetEntityCallbackFunc("And", "OnPickup");
SetEntityCallbackFunc("Antidote", "OnPickup2");
SetEntityPlayerInteractCallback("Antidote", "Win", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "End", "Message2", true, 1);
}


void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup1", 0);
}
void Message2(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup2", 0);
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_1", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked", false, true);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Locked", 0, false);
RemoveItem("And");
}
void OnPickup2(string &in asEntity, string &in type)
{
SetEntityActive("Master", true);
}
void Win(string &in asEntity)
{
StartPlayerLookAt("Master", 3, 5, "");
AddTimer("", 1, "Message_func");
}
void Message_func(string &in asTimer)
{
SetMessage("Messages", "Popup3", 2);
AddTimer("", 2, "CreditStart");
}
void CreditStart(string &in asTimer)
{
StartCredits("ending_daniel.ogg", true, , "Ending", 1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Are you kidding me? Still the same error
Code:
StartCredits("ending_daniel.ogg", true, , "Ending", 1);
I already told you what to do.

-Inurias

FUUUUUU! 'Expected expression value' WTH does that even mean!?
Code:
void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);

........ You are missing the third parameter "asTextCat", add your TextCategory from your .lang file there

i.e
Code:
StartCredits("ending_daniel.ogg", true, "MyCategory", "Ending", 1)

- Inurias
Alright lets test and hope it works!
Halleluja it works now!Thank you very much bro!
Pages: 1 2