The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help My script doesn't work?
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#1
Question  My script doesn't work?

I've started making my custom story in a while and I have faced some errors, which I always found a way to solve every single one of them. Until now.
I made a script in which it makes the grunt active when I pickup fresh meat. I start the game normally, no errors, but when I pick up the freash meat, nothing happens... The monster option: "Active" is not ticked. I've checked the names of the entities and yet... nothing... Help?

The code:

Spoiler below!
///////////////////////////
//Run when entering map
void OnStart()
{
  SetEntityPlayerInteractCallback("fresh_one", "ActivateMonster", true);
}

void ActivateMonster(string &in item)
{
    SetEntityActive("grunt", true);
    AddEnemyPatrolNode("grunt", "PathNodeArea_1", 0, "Idle");
    AddEnemyPatrolNode("grunt", "PathNodeArea_2", 0, "Idle");
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
  }

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

}


Screenshot:
Spoiler below!
[Image: 81913888.jpg]
(This post was last modified: 08-15-2012, 10:18 PM by elbichopt.)
08-15-2012, 06:09 PM
Find


Messages In This Thread
My script doesn't work? - by elbichopt - 08-15-2012, 06:09 PM
RE: My script doesn't work? - by Steve - 08-15-2012, 09:01 PM
RE: My script doesn't work? - by elbichopt - 08-15-2012, 10:10 PM
RE: My script doesn't work? - by Adny - 08-15-2012, 10:14 PM
RE: My script doesn't work? - by elbichopt - 08-15-2012, 10:17 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 10:35 AM
RE: My script doesn't work? - by fuytko - 08-16-2012, 11:31 AM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 11:42 AM
RE: My script doesn't work? - by fuytko - 08-16-2012, 11:51 AM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 11:53 AM
RE: My script doesn't work? - by fuytko - 08-16-2012, 12:00 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 12:05 PM
RE: My script doesn't work? - by fuytko - 08-16-2012, 12:09 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 12:11 PM
RE: My script doesn't work? - by ZyLogicX - 08-16-2012, 12:16 PM
RE: My script doesn't work? - by fuytko - 08-16-2012, 12:20 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 12:33 PM
RE: My script doesn't work? - by fuytko - 08-16-2012, 12:44 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 02:08 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 07:36 PM
RE: My script doesn't work? - by TheGreatCthulhu - 08-16-2012, 07:45 PM
RE: My script doesn't work? - by elbichopt - 08-16-2012, 07:47 PM
RE: My script doesn't work? - by Theforgot3n1 - 08-16-2012, 09:11 PM



Users browsing this thread: 4 Guest(s)