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?
fuytko Offline
Junior Member

Posts: 41
Threads: 6
Joined: Jun 2011
Reputation: 1
#11
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 Big Grin Hmm,write fresh_one into CustomSubItemTypeName box..I think that this is problem..
Also use my second script what I've written Big Grin


(This post was last modified: 08-16-2012, 12:07 PM by fuytko.)
08-16-2012, 12:00 PM
Find
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#12
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 Big Grin Hmm,write fresh_one into CustomSubItemName box..I think that this is problem..
[Image: 35wut3.jpg]
LOL Didn't work. This engine has to be trolling me!
08-16-2012, 12:05 PM
Find
fuytko Offline
Junior Member

Posts: 41
Threads: 6
Joined: Jun 2011
Reputation: 1
#13
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 Big Grin Hmm,write fresh_one into CustomSubItemName box..I think that this is problem..
[Image: 35wut3.jpg]

LOL Didn't work. This engine has to be trolling me!



Angry I'm angry too,going to try that on test custom story,wait..


08-16-2012, 12:09 PM
Find
elbichopt Offline
Junior Member

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

Roger that :\
08-16-2012, 12:11 PM
Find
ZyLogicX Offline
Member

Posts: 245
Threads: 24
Joined: May 2011
Reputation: 6
#15
RE: My script doesn't work?

[Image: script-problem.jpg]

Beyond the Mountains of Madness [15%]
This forum is dying.
08-16-2012, 12:16 PM
Find
fuytko Offline
Junior Member

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

It's working,download and check this out.


Attached Files
.rar   test.rar (Size: 2.24 KB / Downloads: 140)


08-16-2012, 12:20 PM
Find
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#17
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 Tongue
08-16-2012, 12:33 PM
Find
fuytko Offline
Junior Member

Posts: 41
Threads: 6
Joined: Jun 2011
Reputation: 1
#18
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 Tongue

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
Find
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#19
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:

Spoiler below!
[Image: 11207641.png]
08-16-2012, 02:08 PM
Find
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#20
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
Find




Users browsing this thread: 1 Guest(s)