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
Make player look at entity?
Inurias Offline
Junior Member

Posts: 20
Threads: 0
Joined: Jan 2012
Reputation: 2
#11
RE: Make player look at entity?

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

02-03-2012, 07:05 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#12
RE: Make player look at entity?

////////////////////////////
// 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
Find
Inurias Offline
Junior Member

Posts: 20
Threads: 0
Joined: Jan 2012
Reputation: 2
#13
RE: Make player look at entity?

(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
StartCredits("ending_daniel.ogg", true, , "Ending", 1);
I already told you what to do.

-Inurias

02-03-2012, 07:30 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#14
RE: Make player look at entity?

FUUUUUU! 'Expected expression value' WTH does that even mean!?

02-03-2012, 07:50 PM
Find
Inurias Offline
Junior Member

Posts: 20
Threads: 0
Joined: Jan 2012
Reputation: 2
#15
RE: Make player look at entity?

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
StartCredits("ending_daniel.ogg", true, "MyCategory", "Ending", 1)

- Inurias
02-03-2012, 08:16 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#16
RE: Make player look at entity?

Alright lets test and hope it works!
Halleluja it works now!Thank you very much bro!

(This post was last modified: 02-03-2012, 10:29 PM by Datguy5.)
02-03-2012, 10:08 PM
Find




Users browsing this thread: 1 Guest(s)