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
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#9
RE: Troubles with monster

I think you have you're true/false for SetEnemyDisableTriggers the wrong way round.

Disable Triggers - true
It is true that the triggers are disabled, so the enemy doesn't react to the player

Disable Triggers - false
It is false that the triggers are disabled, so it will chase the player


Try it the other way around
void QuietYou(string& asName, bool abDisabled)
    {
    SetEnemyDisableTriggers("Myboi", true);
    }

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

(06-07-2013, 04:51 PM)thaniels Wrote: Also, if i have this in my script:
if(ScriptDebugOn()) {

}

where do i put my code

Yeh it goes between the { }

if (ScriptDebugOn()) {
    // code here
}

Exactly the same as code within a function, the way you show that a block of code belongs in a certain group is with { and }
Here's an example, first as you might see it, and in the second example I've marked it up with comments to show what I mean

void Function(stuff)
{
     CODE HERE
     if (x == y)
     {
            CODE HERE
     }
}

void Function(stuff)
{ // this starts the code block for Function
     CODE HERE
     if (x == y)
     { // this starts the code block for the 'if'
            CODE HERE
     }// this ends the code block for the 'if'
} // this ends the code block for Function


It's also worth remembering that it doesn't matter where you put the { and }, so long as they are there
All of these examples are valid

if (x == y)
{
   // code
}

if (x == y) {
   // code
}

if (x == y) { // code }

(This post was last modified: 06-10-2013, 12:12 AM by Adrianis.)
06-09-2013, 11:27 PM
Find


Messages In This Thread
Troubles with monster - by thaniels - 06-07-2013, 04:51 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)