| Raymond   Member
 
 Posts: 126
 Threads: 24
 Joined: Feb 2011
 Reputation: 
0
 | 
			| RE: Error when testing my map 
 
				 (03-02-2011, 04:10 PM)nkmol Wrote:   (03-02-2011, 10:47 AM)Raymond Wrote:  ////////////////////////////you made 2 void callback whith one function, so one callback doesn't have a function( the MonsterFunc1). try this :// Run when entering map
 void OnEnter()
 {
 AddUseItemCallback("", "prisonkey_1", "mansion_3", "UsedKeyOnDoor", true);
 }
 
 void UsedKeyOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("mansion_3", false, true);
 PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
 RemoveItem("prisonkey_1");
 }
 
 I see, thanks for the tip
  . ////////////////////////////
 // Run when leaving map
 void OnLeave()
 {
 }
 
 void OnStart()
 {
 AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
 AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area" , true , 1);
 }
 void MonsterFunc1(string &in asParent , string &in asChild , int alState)
 void Collide_Area(string &in asParent , string &in asChild , int alState)
 {
 SetEntityActive("servant_grunt_1" , true);
 SetEntityActive("slime_anim_wall_1" , true);
 }
 
 Another problem, i am trying to spawn a Slime, but Did i put something wrong, please help
  . 
 ////////////////////////////// Run when entering map
 void OnEnter()
 {
 AddUseItemCallback("", "prisonkey_1", "mansion_3", "UsedKeyOnDoor", true);
 }
 
 void UsedKeyOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("mansion_3", false, true);
 PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
 RemoveItem("prisonkey_1");
 }
 
 ////////////////////////////
 // Run when leaving map
 void OnLeave()
 {
 }
 
 void OnStart()
 {
 AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
 AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area" , true , 1);
 }
 
 void MonsterFunc1(string &in asParent , string &in asChild , int alState)
 {
 SetEntityActive("servant_grunt_1" , true);
 }
 
 void Collide_Area(string &in asParent , string &in asChild , int alState)
 {
 SetEntityActive("slime_anim_wall_1" , true);
 }
think about it. how can the game know that the void MonsterFunc1 needs to active a grunt? because u'll say it has 2things, grunt and slime_wall. First be detailerd about the script, that will help a bit, though
  
 One World To Another [DEMO] coming soon. |  |