08-15-2012, 06:09 PM
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:
Screenshot:
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!
Code:
///////////////////////////
//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: grunt1.png]](http://img821.imageshack.us/img821/6642/grunt1.png)
![[Image: grunt2.png]](http://img832.imageshack.us/img832/8321/grunt2.png)
![[Image: meat1.png]](http://img20.imageshack.us/img20/3486/meat1.png)
![[Image: meat2.png]](http://img842.imageshack.us/img842/667/meat2.png)