RE: My script doesn't work? - fuytko - 08-16-2012
(08-16-2012, 11:53 AM) elbichopt Wrote: (08-16-2012, 11:51 AM) fuytko Wrote: Code:
///////////////////////////
//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?
I'm almost done Hmm,write fresh_one into CustomSubItemTypeName box..I think that this is problem..
Also use my second script what I've written
RE: My script doesn't work? - elbichopt - 08-16-2012
(08-16-2012, 12:00 PM) fuytko Wrote: (08-16-2012, 11:53 AM) elbichopt Wrote: (08-16-2012, 11:51 AM) fuytko Wrote: Code:
///////////////////////////
//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?
I'm almost done Hmm,write fresh_one into CustomSubItemName box..I think that this is problem..
LOL Didn't work. This engine has to be trolling me!
RE: My script doesn't work? - fuytko - 08-16-2012
(08-16-2012, 12:05 PM) elbichopt Wrote: (08-16-2012, 12:00 PM) fuytko Wrote: (08-16-2012, 11:53 AM) elbichopt Wrote: (08-16-2012, 11:51 AM) fuytko Wrote: Code:
///////////////////////////
//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?
I'm almost done Hmm,write fresh_one into CustomSubItemName box..I think that this is problem..
LOL Didn't work. This engine has to be trolling me!
I'm angry too,going to try that on test custom story,wait..
RE: My script doesn't work? - elbichopt - 08-16-2012
Roger that :\
RE: My script doesn't work? - ZyLogicX - 08-16-2012
RE: My script doesn't work? - fuytko - 08-16-2012
It's working,download and check this out.
RE: My script doesn't work? - elbichopt - 08-16-2012
(08-16-2012, 12:20 PM) fuytko Wrote: It's working,download and check this out. Wow yeah that map works but I don't know why, mine doesnt o.o
Anyways, thank you for your time! I will try to create my map around yours
RE: My script doesn't work? - fuytko - 08-16-2012
(08-16-2012, 12:33 PM) elbichopt Wrote: (08-16-2012, 12:20 PM) fuytko Wrote: It's working,download and check this out.
Wow yeah that map works but I don't know why, mine doesnt o.o
Anyways, thank you for your time! I will try to create my map around yours
No problem..If some problems appears,tell me then.
RE: My script doesn't work? - elbichopt - 08-16-2012
Sorry to bother you again, but what if I want to call more grunts?
I added more fresh meats and made this code. But only the one you made works xD
Spoiler below!
Code:
///////////////////////////
//Run when entering map
void OnStart()
{
SetEntityPlayerInteractCallback("fresh_one", "ActivateMonster", true);
SetEntityPlayerInteractCallback("fresh_two", "ActivateMonster_2", true);
SetEntityPlayerInteractCallback("fresh_three", "ActivateMonster_3", true);
SetEntityPlayerInteractCallback("fresh_four", "ActivateMonster_4", true);
}
void ActivateMonster(string &in asEntity)
{
SetEntityActive("grunt", true);
AddEnemyPatrolNode("grunt", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_3", 6.0f, "");
}
void ActivateMonster_2(string &in asEntity)
{
SetEntityActive("grunt_2", true);
AddEnemyPatrolNode("grunt_2", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_3", 6.0f, "");
}
void ActivateMonster_3(string &in asEntity)
{
SetEntityActive("grunt_3", true);
AddEnemyPatrolNode("grunt_3", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("grunt_3", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("grunt_3", "PathNodeArea_3", 6.0f, "");
}
void ActivateMonster_4(string &in asEntity)
{
SetEntityActive("grunt_4", true);
AddEnemyPatrolNode("grunt_4", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("grunt_4", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("grunt_4", "PathNodeArea_3", 6.0f, "");
}
Screenshot:
RE: My script doesn't work? - elbichopt - 08-16-2012
Also, is there a way to make the enemy bigger? I tried to change the scale but when I enter the map it is on its normal size.