fuytko
Junior Member
Posts: 41
Threads: 6
Joined: Jun 2011
Reputation:
1
|
RE: My script doesn't work?
(08-16-2012, 11:53 AM)elbichopt Wrote: (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?
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
(This post was last modified: 08-16-2012, 12:07 PM by fuytko.)
|
|
08-16-2012, 12:00 PM |
|
elbichopt
Junior Member
Posts: 14
Threads: 2
Joined: Aug 2012
Reputation:
0
|
RE: My script doesn't work?
(08-16-2012, 12:00 PM)fuytko Wrote: (08-16-2012, 11:53 AM)elbichopt Wrote: (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?
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!
|
|
08-16-2012, 12:05 PM |
|
fuytko
Junior Member
Posts: 41
Threads: 6
Joined: Jun 2011
Reputation:
1
|
RE: My script doesn't work?
(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: ///////////////////////////
//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..
|
|
08-16-2012, 12:09 PM |
|
elbichopt
Junior Member
Posts: 14
Threads: 2
Joined: Aug 2012
Reputation:
0
|
RE: My script doesn't work?
Roger that :\
|
|
08-16-2012, 12:11 PM |
|
ZyLogicX
Member
Posts: 245
Threads: 24
Joined: May 2011
Reputation:
6
|
RE: My script doesn't work?
|
|
08-16-2012, 12:16 PM |
|
fuytko
Junior Member
Posts: 41
Threads: 6
Joined: Jun 2011
Reputation:
1
|
RE: My script doesn't work?
It's working,download and check this out.
|
|
08-16-2012, 12:20 PM |
|
elbichopt
Junior Member
Posts: 14
Threads: 2
Joined: Aug 2012
Reputation:
0
|
RE: My script doesn't work?
(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
|
|
08-16-2012, 12:33 PM |
|
fuytko
Junior Member
Posts: 41
Threads: 6
Joined: Jun 2011
Reputation:
1
|
RE: My script doesn't work?
(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.
(This post was last modified: 08-16-2012, 12:50 PM by fuytko.)
|
|
08-16-2012, 12:44 PM |
|
elbichopt
Junior Member
Posts: 14
Threads: 2
Joined: Aug 2012
Reputation:
0
|
RE: My script doesn't work?
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!
///////////////////////////
//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:
|
|
08-16-2012, 02:08 PM |
|
elbichopt
Junior Member
Posts: 14
Threads: 2
Joined: Aug 2012
Reputation:
0
|
RE: My script doesn't work?
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.
|
|
08-16-2012, 07:36 PM |
|
|