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
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: My script doesn't work?

the code seems to be alright could you send some screen shots of your meat's and grunt's settings?

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
08-15-2012, 09:01 PM
Find
elbichopt Offline
Junior Member

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

(08-15-2012, 09:01 PM)Steve Wrote: the code seems to be alright could you send some screen shots of your meat's and grunt's settings?
Thank you for replying!

Sure do:

Grunt:
Spoiler below!
[Image: grunt1.png]
Spoiler below!
[Image: grunt2.png]

Meat:
Spoiler below!
[Image: meat1.png]
Spoiler below!
[Image: meat2.png]
08-15-2012, 10:10 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: My script doesn't work?

Make sure the name of the map and hps files are exactly the same, and they're in the same folder. In addition, make sure your hps is actually a c++ file, and not just a text file.

I rate it 3 memes.
08-15-2012, 10:14 PM
Find
elbichopt Offline
Junior Member

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

(08-15-2012, 10:14 PM)andyrockin123 Wrote: Make sure the name of the map and hps files are exactly the same, and they're in the same folder. In addition, make sure your hps is actually a c++ file, and not just a text file.
The hps file was edited with Notepad++ and has the same name as the corresponding map.

Thank you for replying though!
08-15-2012, 10:17 PM
Find
elbichopt Offline
Junior Member

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

Help? :\
08-16-2012, 10:35 AM
Find
fuytko Offline
Junior Member

Posts: 41
Threads: 6
Joined: Jun 2011
Reputation: 1
#7
RE: My script doesn't work?

Try this!

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

void ActivateMonster(string &in asEntity)
{
     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()
{

}


(This post was last modified: 08-16-2012, 11:32 AM by fuytko.)
08-16-2012, 11:31 AM
Find
elbichopt Offline
Junior Member

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

(08-16-2012, 11:31 AM)fuytko Wrote: Try this!

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

void ActivateMonster(string &in asEntity)
{
     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()
{

}
Nothing :\
Thank you for your time though...
08-16-2012, 11:42 AM
Find
fuytko Offline
Junior Member

Posts: 41
Threads: 6
Joined: Jun 2011
Reputation: 1
#9
RE: My script doesn't work?

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

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

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

}

This one must work!


08-16-2012, 11:51 AM
Find
elbichopt Offline
Junior Member

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

(08-16-2012, 11:51 AM)fuytko Wrote:
///////////////////////////
//Run when entering map
void OnStart()
{
SetEntityPlayerInteractCallback("fresh_one", "ActivateMonster", true);
}

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

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

}

This one must work!
I'm raging out here! LOL It didn't work...

Can it be because of the light?
(This post was last modified: 08-16-2012, 11:54 AM by elbichopt.)
08-16-2012, 11:53 AM
Find




Users browsing this thread: 2 Guest(s)