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
Enemy Path help!!
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#8
RE: Enemy Path help!!

I'm going to assume you want the monster to activate.

PHP Code: (Select All)
void OnStart()
{
    
GiveItemFromFile("lantern""lantern.ent");
    
    for(
int i=0;i<5;i++)
        
GiveItemFromFile("tinderbox_"+i"tinderbox.ent");

    
AddEntityCollideCallback("Player""ScriptArea_1""MonsterVoice1"true1);
    
AddEntityCollideCallback("Player""ScriptArea_4""MonsterSpawn1"true1);
    
AddEntityCollideCallback("Player""ScriptArea_5""MonsterSpawnOff1"true1);
    
AddEntityCollideCallback("Player""ScriptArea_2""CloseDoor"true1);
    
AddEntityCollideCallback("Player""ScriptArea_6""OpenDoor"true1);
    
AddEntityCollideCallback("Player""ScriptArea_7""MonsterSpawn2"true1);
    
AddEntityCollideCallback("Player""ScriptArea_8""PrisonerVoice1"true1);
    
AddUseItemCallback("""Cell_Key1""door_1""KeyOnDoor"true);
    
AddEntityCollideCallback("Player""ScriptArea_9""MonsterFunction"true1);
    
AddEntityCollideCallback("Player""MonsterEnd""MonsterEnd"true1);
    
AddEntityCollideCallback("servant_brute_1""PNScriptArea""MonsterFunction2"false1);
}

void TimerDoneLookAt(string &in asTimer)
{
    
StopPlayerLookAt();
}

void KeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("door_1"falsetrue);
    
PlaySoundAtEntity("""unlock_door.snt""door_1"0.0ftrue);
}

void CloseDoor(string &in asParentstring &in asChildint alState)
{
    
SetSwingDoorClosed("door_1"truetrue);
    
SetSwingDoorLocked("door_1"truetrue);
    
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
    
PlaySoundAtEntity("""react_scare.snt""Player"0false);
    
PlaySoundAtEntity("""close_door.snt""Player"0false);
    
GiveSanityDamage(15.0ftrue);
}

void MonsterVoice1(string &in asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("""enabled.snt""torch_static01_3"0false);
}

void MonsterSpawn1(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"true);
}

void MonsterSpawnOff1(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"false);
}

void OpenDoor(string &in asParentstring &in asChildint alState)
{
    
AddPropImpulse("iron_maiden_1"50150"World"); //red is x axis, blue is z axis, green is y axis.
    
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
    
PlaySoundAtEntity("""react_scare.snt""Player"0false);
    
GiveSanityDamage(15.0ftrue);
}

void PrisonerVoice1(string &in asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("""15_prisoner_beg.snt""Player"0false);
}


void MonsterSpawn2(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_brute_1"true);
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_1"2"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_2"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_3"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_4"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_5"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_6"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_7"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_8"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_9"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_10"0"");
}

void MonsterFunction2()
{
    for (
int i 1<6i++)
    {
        
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_"+100"");
    }
}

void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_brute_1"true);

    for (
int i 1<11i++)
    {
        
int x i;
        
        if (
== 1)
        {
            
2;
        }
        
        if (
== 10)
        {
            
4;
        }
        
        if (
!= || != 10)
        {
            
0;
        }
        
        
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_"+ix"");
    }
}

void MonsterEnd(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_brute_1"false);


Tutorials: From Noob to Pro
(This post was last modified: 12-24-2011, 11:39 PM by Your Computer.)
12-24-2011, 11:38 PM
Website Find


Messages In This Thread
Enemy Path help!! - by Peku - 12-24-2011, 09:36 PM
RE: Script Problem!! - by Your Computer - 12-24-2011, 09:47 PM
RE: Script Problem!! - by Peku - 12-24-2011, 10:03 PM
RE: Enemy Path help!! - by Your Computer - 12-24-2011, 11:09 PM
RE: Enemy Path help!! - by Peku - 12-24-2011, 11:14 PM
RE: Enemy Path help!! - by Your Computer - 12-24-2011, 11:20 PM
RE: Enemy Path help!! - by Peku - 12-24-2011, 11:30 PM
RE: Enemy Path help!! - by Your Computer - 12-24-2011, 11:38 PM
RE: Enemy Path help!! - by Peku - 12-24-2011, 11:42 PM
RE: Enemy Path help!! - by Your Computer - 12-24-2011, 11:45 PM
RE: Enemy Path help!! - by Peku - 12-24-2011, 11:51 PM



Users browsing this thread: 1 Guest(s)