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
Troubles with monster
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#2
RE: Troubles with monster

(06-07-2013, 04:51 PM)thaniels Wrote: Hello dear forum,

I am having some trouble making my monster listen to me.

The situation I am dealing with is that I have a monster that is behind a door, what i want to achieve is to make the monster inactive (but visible) until the player hits a particular script area, the thing that is happening right now is that the monster is active regardless of me adding a script making him inactive at the start of the level, and activating him when the player has set a few steps inside the hallway where the monster is hiding in the mist. I have a timer of 15 seconds before the monster should actually become active and attack the player

Can anyone have a look at my script and see if they can find the reason I could be having this trouble with my monster?

Also, if i have this in my script:
if(ScriptDebugOn()) {

}

where do i put my code, i have been looking all over the internet but i can't seem to an find and answer which actually answers my question, where does my code go? between the {}? I have no idea Sad

[code] void OnStart()
  {
    AddEntityCollideCallback("Player", "script_slam", "DoorClose", true, 1);  
    AddEntityCollideCallback("Player", "Sir?", "Hello", true, 1);
    AddEntityCollideCallback("Myboi", "MonsterPlzStahp2", "Stahp", true, 1);
    AddEntityCollideCallback("Player", "DisableMonster", "QuietYou", true, 1);
  }
  void OnEnter()
    {
    }

    //===========================================
    // This runs when the player leaves the map
    void OnLeave()
    {
    }
    
    void QuietYou(string& asName, bool abDisabled)
    {
    SetEnemyDisableTriggers("Myboi", false);
    }
    
    void DoorDelay(string& asName, float afTime, string& asFunction)
    {
    AddTimer("WaitForIt", 4, "DoorClose");
    }

    void DoorClose(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_4", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);  
PlaySoundAtEntity("", "react_scare", "Player", 0, false);  PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void Hello(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("NothingScaryYet", "enemy_hallucination_disappear.snt", "Player", 0, false);
AddTimer("Conversation", 15, "Attack");
}


void Attack(string& asName, bool abDisabled)
{
SetEnemyDisableTriggers("Myboi", true);
AddEnemyPatrolNode("Myboi", "MoveHerePlease1", 0, "");
}

void Stahp(string &in asParent, string &in asChild, int alState)
    {
    SetEntityActive("Myboi", false);
    }
[/code]
Is the monster not attacking or what?
What is the problem with the monster?

And Scriptdebug is not easy i can tell you i got it in my script looks like this.

void OnStart(){
   SetLocalVarInt("CellarDoorOpen", 0);          
   SetLocalVarInt("FirstTimeCellar", 1);
}

void EnterCellar(string &in asEntity) // Teleport Player Into The Cellar.
{    
        if(GetLocalVarInt("CellarDoorOpen") != 1)
    {        
        SetMessage("Messages", "DoorLocked", 0);      
        return;    
    }        

        TeleportPlayer("InsideCellar");        
        if(GetLocalVarInt("FirstTimeCellar") == 1)
    {        
         SetMessage("Messages", "EnteringTheCellar", 0);        
         SetLocalVarInt("FirstTimeCellar", 0);
    }
}
Also if you want the monster to attack you, it should be this Func.

ShowEnemyPlayerPosition("MonsterName");


When you add this script the monster is instant seeing the player and chase him.

If you got any question i like to hear them.

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
(This post was last modified: 06-07-2013, 06:54 PM by VeNoMzTeamHysterical.)
06-07-2013, 06:46 PM
Website Find


Messages In This Thread
Troubles with monster - by thaniels - 06-07-2013, 04:51 PM
RE: Troubles with monster - by VeNoMzTeamHysterical - 06-07-2013, 06:46 PM
RE: Troubles with monster - by thaniels - 06-07-2013, 07:51 PM
RE: Troubles with monster - by CarnivorousJelly - 06-07-2013, 07:21 PM
RE: Troubles with monster - by Your Computer - 06-07-2013, 08:23 PM
RE: Troubles with monster - by thaniels - 06-07-2013, 08:50 PM
RE: Troubles with monster - by Your Computer - 06-07-2013, 09:08 PM
RE: Troubles with monster - by thaniels - 06-09-2013, 06:26 PM
RE: Troubles with monster - by Adrianis - 06-09-2013, 11:27 PM
RE: Troubles with monster - by thaniels - 06-10-2013, 09:05 PM
RE: Troubles with monster - by Adrianis - 06-11-2013, 12:27 PM
RE: Troubles with monster - by Daemian - 06-11-2013, 01:22 AM
RE: Troubles with monster - by PutraenusAlivius - 06-11-2013, 01:59 AM



Users browsing this thread: 1 Guest(s)