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
a function with same name and function alrdy exist?
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#9
RE: a function with same name and function alrdy exist?

..Just change the name and you're good. But since you probably have no idea what even a function is:
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "key_4", "castle_no_grav_1", "KeyOnDoor", true);
AddUseItemCallback("", "bone_saw_1", "wooden_boards_block_1", "DestroyPlank", true);
StartPlayerLookAt("bone_saw_1", 2, 2, "");

AddTimer("StopLook", 4, "LookAtSaw");
}

void DestroyPlank(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "26_saw.snt", "wooden_boards_block_1", 0.0f, true);
RemoveItem("bone_saw_1");
AddTimer("", 4, "DestroyPlank2");
}
void DestroyPlank2(string &in asTimer)
{
SetEntityActive("wooden_boards_block_1", false);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_no_grav_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_no_grav_1", 0.0f, true);
RemoveItem("key_4");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

void LookAtSaw(string &in asTimer)
{
StopPlayerLookAt();
}
With such scripting skills, don't expect anything better than dissapearing wooden planks. You should look at some tutorials at http://wiki.frictionalgames.com/hpl2/amn..._functions
(This post was last modified: 06-23-2012, 05:30 PM by Cruzore.)
06-23-2012, 05:28 PM
Find


Messages In This Thread
RE: a function with same name and function alrdy exist? - by Cruzore - 06-23-2012, 05:28 PM



Users browsing this thread: 1 Guest(s)