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 Problem!
JoeBradleyUK Offline
Member

Posts: 115
Threads: 20
Joined: Jul 2011
Reputation: 0
#1
Script Problem!

My Script won't work, what's wrong with it? Blush

////////////////////////////
// Run when starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Storage_Scare", "Storage_Scare", true, 0);
}


void Storage_Scare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Storage_Enemy, true);
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_1", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_2", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_3", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_5", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_6", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_7", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_8", "0.1", "";
AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_9", "0.1", "";
}

void FirstDiary(string &in item, int index)
{
ReturnOpenJournal(true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("04_amb.ogg", true, 0.7, 0.1, 0, true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
StopMusic(0.4, 0);
}

:Work In Progress:
Insanity
(This post was last modified: 07-18-2011, 10:16 PM by JoeBradleyUK.)
07-18-2011, 08:56 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Script Problem!

("Storage_Enemy, true);
->
("Storage_Enemy", true);

07-18-2011, 08:58 PM
Website Find
JoeBradleyUK Offline
Member

Posts: 115
Threads: 20
Joined: Jul 2011
Reputation: 0
#3
RE: Script Problem!

Ok, now that is working it seems that the path nodes (I think) are not working as I got a lot more errors than before!

:Work In Progress:
Insanity
(This post was last modified: 07-18-2011, 09:22 PM by JoeBradleyUK.)
07-18-2011, 09:07 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#4
RE: Script Problem!

AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", ""; should be changed to AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", "");
*you have to remember to add the ending parenthesis! Fix that on all of your patrol nodes and it should work!*

Ba-da bing, ba-da boom.
07-18-2011, 09:39 PM
Find
JoeBradleyUK Offline
Member

Posts: 115
Threads: 20
Joined: Jul 2011
Reputation: 0
#5
RE: Script Problem!

(07-18-2011, 09:39 PM)JenniferOrange Wrote: AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", ""; should be changed to AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", "");
*you have to remember to add the ending parenthesis! Fix that on all of your patrol nodes and it should work!*

Oh thanks, aha that, was just a silly mistake which I didn't see some reason!Tongue
(07-18-2011, 10:14 PM)JoeBradleyUK Wrote:
(07-18-2011, 09:39 PM)JenniferOrange Wrote: AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", ""; should be changed to AddEnemyPatrolNode("Storage_Enemy", "PathNodeArea_4", "0.1", "");
*you have to remember to add the ending parenthesis! Fix that on all of your patrol nodes and it should work!*

Oh thanks, aha that, was just a silly mistake which I didn't see some reason!Tongue

Another thing, do monsters disappear on their own? If not how would I make them disappear at a certain pathnode?

:Work In Progress:
Insanity
(This post was last modified: 07-18-2011, 10:17 PM by JoeBradleyUK.)
07-18-2011, 10:14 PM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#6
RE: Script Problem!

Monsters disappear, if they are hallucinations (coming near to you), or if they are standing around and have nothing to do.

If you want them to disappear at a certain pathnode:

void OnStart(){
AddEntityCollideCallback("grunt", "pathnode", "function", true, 1);
}

void function(string &in asParent, string &in asChild, int alState){
FadeEnemyToSmoke("grunt", false);
}
07-18-2011, 10:25 PM
Find
JoeBradleyUK Offline
Member

Posts: 115
Threads: 20
Joined: Jul 2011
Reputation: 0
#7
RE: Script Problem!

(07-18-2011, 10:25 PM)MrCookieh Wrote: Monsters disappear, if they are hallucinations (coming near to you), or if they are standing around and have nothing to do.

If you want them to disappear at a certain pathnode:

void OnStart(){
AddEntityCollideCallback("grunt", "pathnode", "function", true, 1);
}

void function(string &in asParent, string &in asChild, int alState){
FadeEnemyToSmoke("grunt", false);
}

Thanks! You guys on the forum are really helpful Big Grin

:Work In Progress:
Insanity
07-18-2011, 10:34 PM
Find




Users browsing this thread: 1 Guest(s)