Make player look at entity?
I want that the player turns around and looks at entity when he picks up an item and after that a message appears in the screen saying something like 'You will never be free!' and then the credits would start.How would i do that?
Heres my hps file
////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "And", "Locked", "KeyOnDoor", true);
SetEntityCallbackFunc("And", "OnPickup");
SetEntityCallbackFunc("Antidote", "OnPickup2");
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);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(This post was last modified: 02-03-2012, 10:29 PM by Datguy5.)
|