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
New to this, having some trouble
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#10
RE: New to this, having some trouble

(02-27-2013, 11:28 AM)DeAngelo Wrote:
(02-27-2013, 11:16 AM)No Author Wrote: Is that your full script ?
No, I just took out stuff about other things like my doors and monsters to make it easier to look through. Here's my full script.
PHP Code: (Select All)
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
    
SetEntityActive("servant_grunt_1", true); 
    
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
    
}

void UsedKeyOnAlcDoor(string &in asItem, string &in asEntity)
{
    
SetSwingDoorLocked("AlcDoor", false, true);
    
PlaySoundAtEntity("", "unlock_door.snt", "AlcDoor", 0.0f, true);
    
RemoveItem("Key_AlcDoor");
}

void WallChange1(string &in asParent, string &in asChild, int alState)
{
    
SetEntityActive("Key1disappear_*",false);
    
SetEntityActive("Key1appear_*",true);
}

void SpotlightOn(string &in asParent, string &in asChild, int alState)
{
    
SetLightVisible("Spotlight_4", True); 
}
void SpotlightOff(string &in asParent, string &in asChild, int alState)
{
    
SetLightVisible("Spotlight_4", False); 
} 

void OnStart() 
{ 
    
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); 
    
AddEntityCollideCallback("Player", "PlayerCollide_Spotlight", "SpotlightOn", true, 1);
    
AddEntityCollideCallback("Player", "PlayerCollide_SpotlightOff", "SpotlightOff", true, 1);    
    
AddEntityCollideCallback("Player", "PlayerCollide_key1", "WallChange1", true, 1); 
    
AddUseItemCallback("", "Key_AlcDoor", "AlcDoor", "UsedKeyOnAlcDoor", true);    
} 

I think you need to add the void OnLeave(). Check my post before this one.

[Image: the-cabin-in-the-woods-masked-people.jpg]
02-27-2013, 11:33 AM
Find


Messages In This Thread
New to this, having some trouble - by DeAngelo - 02-27-2013, 07:23 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 07:40 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 08:51 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 09:36 AM
RE: New to this, having some trouble - by No Author - 02-27-2013, 11:33 AM
RE: New to this, having some trouble - by NaxEla - 03-02-2013, 10:05 AM



Users browsing this thread: 1 Guest(s)