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
Another Problem
jmayo Offline
Junior Member

Posts: 16
Threads: 6
Joined: Sep 2011
Reputation: 0
#1
Another Problem

I Am Trying to make The monster Spawn When You Go To The Script Area And I Tried This:

AddEntityCollideCallback("Player", "monster", "MonsterStart", true, 1);
}

void MonsterStart(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "endNode", 9999.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 9999.0f, "");
}

But I Got an error Can You help me Exclamation
10-05-2011, 11:46 PM
Find
Tanshaydar Offline
From Beyond

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

Is this whole script file?
Also, what kind of error do you get?
Also, why did you write 9999.0f for the waiting time?

10-06-2011, 12:05 AM
Website Find
jmayo Offline
Junior Member

Posts: 16
Threads: 6
Joined: Sep 2011
Reputation: 0
#3
RE: Another Problem

I Took That Part From Another Story
And No Its Not The Whole script The Rest is For Unlocking A Door
10-06-2011, 12:08 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Another Problem

You're going to need to post more than that and also provide us with the error you got.

Tutorials: From Noob to Pro
10-06-2011, 01:01 AM
Website Find
jmayo Offline
Junior Member

Posts: 16
Threads: 6
Joined: Sep 2011
Reputation: 0
#5
RE: Another Problem


[Image: erroris.png]

Here Is The Whole Script:

////////////////////////////+
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Prisonkey_1", "prison_1", "usedkeyondoor", true);
}
void usedkeyondoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_1", false, true);
PlaySoundAtEntity("", "unlock_door", "prison_1", 0, false);
RemoveItem("Prisonkey_1");
}

{
AddEntityCollideCallback("Player", "monster", "MonsterStart", true, 1);
}

void MonsterStart(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "endNode", 9999.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 9999.0f, "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}
10-07-2011, 12:16 AM
Find
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#6
RE: Another Problem

PHP Code: (Select All)
////////////////////////////+
// Run first time starting map
void OnStart()
{
AddUseItemCallback("""Prisonkey_1""prison_1""usedkeyondoor"true);
AddEntityCollideCallback("Player""monster""MonsterStart"true1);
}
void usedkeyondoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("prison_1"falsetrue);
PlaySoundAtEntity("""unlock_door""prison_1"0false);
RemoveItem("Prisonkey_1");
}



void MonsterStart(string &in asParentstring &in asChildint alState)
{
SetEntityActive("servant_grunt_1"true);
AddEnemyPatrolNode("servant_grunt_1""endNode"9999.0f"");
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"9999.0f"");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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



Always put your call backs in the onStart() Proc and not anywhere in the code!

Rep if like me or im helpful or you love my stories!
Stephanos house
10-07-2011, 12:18 AM
Find




Users browsing this thread: 1 Guest(s)