Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when testing my map
Author Message
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #21
RE: Error when testing my map

(02-27-2011 12:22 PM)nkmol Wrote:  That's because you forgot </CATEGORY> again Tongue

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Escape the castle!</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Hotel01_Name">Hotel Room</Entry>
<Entry Name="Note_Hotel01_Text">Test</Entry>
</CATEGORY>
</LANGUAGE>

try to add that and tell me if it works Big Grin

Finally, it worked Smile.

One World To Another [DEMO] coming soon.
02-27-2011 02:39 PM
Find all posts by this user Quote this message in a reply
XxItachi09xX Offline
Junior Member

Posts: 16
Joined: Feb 2011
Reputation: 0
Post: #22
RE: Error when testing my map

hey can you please tell me how to find those certain script? find the "i need certain script" tread
(This post was last modified: 02-28-2011 10:24 AM by XxItachi09xX.)
02-28-2011 10:23 AM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #23
RE: Error when testing my map

(02-28-2011 10:23 AM)XxItachi09xX Wrote:  hey can you please tell me how to find those certain script? find the "i need certain script" tread

?

Anyways

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Escape the castle!</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_PrisonKey">Prison Key</Entry>
<Entry Name="ItemDesc_PrisonKey">Key to unlock the 1st padlock from the door with 2 padlocks.</Entry>
<Entry Name="ItemName_PrivateRoomKey">Private Room Key</Entry>
<Entry Name="ItemDesc_PrivateRoomKey">Key to unlock the door to the Private Room.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Hotel01_Name">Hotel Room</Entry>
<Entry Name="Note_Hotel01_Text">Test</Entry>
</CATEGORY>
</LANGUAGE>

My description doesn't have words again, please help Sad.
Wait, i fixed it.

One World To Another [DEMO] coming soon.
(This post was last modified: 02-28-2011 10:29 AM by Raymond.)
02-28-2011 10:26 AM
Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #24
RE: Error when testing my map

Good you fixed it Tongue

(02-28-2011 10:23 AM)XxItachi09xX Wrote:  hey can you please tell me how to find those certain script? find the "i need certain script" tread

u mean the wiki site where the scripts listed? Tongue here it is : http://wiki.frictionalgames.com/hpl2/amn..._functions
(This post was last modified: 02-28-2011 04:02 PM by nkmol.)
02-28-2011 03:59 PM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #25
RE: Error when testing my map

////////////////////////////
// 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)
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 Sad.

One World To Another [DEMO] coming soon.
(This post was last modified: 03-02-2011 10:49 AM by Raymond.)
03-02-2011 10:47 AM
Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #26
RE: Error when testing my map

(03-02-2011 10:47 AM)Raymond Wrote:  ////////////////////////////
// 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)
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 Sad.
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");
}

////////////////////////////
// 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 Tongue
(This post was last modified: 03-02-2011 04:13 PM by nkmol.)
03-02-2011 04:10 PM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #27
RE: Error when testing my map

(03-02-2011 04:10 PM)nkmol Wrote:  
(03-02-2011 10:47 AM)Raymond Wrote:  ////////////////////////////
// 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 Smile.
////////////////////////////
// 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 Sad.
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");
}

////////////////////////////
// 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 Tongue

One World To Another [DEMO] coming soon.
03-03-2011 08:35 AM
Find all posts by this user Quote this message in a reply
Zuul Offline
Junior Member

Posts: 5
Joined: Feb 2011
Reputation: 0
Post: #28
RE: Error when testing my map

(02-28-2011 10:26 AM)Raymond Wrote:  
(02-28-2011 10:23 AM)XxItachi09xX Wrote:  hey can you please tell me how to find those certain script? find the "i need certain script" tread

?

Anyways

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Escape the castle!</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_PrisonKey">Prison Key</Entry>
<Entry Name="ItemDesc_PrisonKey">Key to unlock the 1st padlock from the door with 2 padlocks.</Entry>
<Entry Name="ItemName_PrivateRoomKey">Private Room Key</Entry>
<Entry Name="ItemDesc_PrivateRoomKey">Key to unlock the door to the Private Room.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Hotel01_Name">Hotel Room</Entry>
<Entry Name="Note_Hotel01_Text">Test</Entry>
</CATEGORY>
</LANGUAGE>

My description doesn't have words again, please help Sad.
Wait, i fixed it.

How? I'm dealing with pretty much the same problem.

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Filler description[br][br]etc.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_RejectionLetter_Name">Rejection Letter</Entry>
<Entry Name="Note_RejectionLetter_Text">Lots and lots of text[br][br]Some more text[br][br]Even more text, would ya look at that.[br][br]These lines actually have proper text in the map[br][br]Text. Moar text.[br][br]Blahblah[br][br][br]asdfghj[br]I just removed it from the copy-pasted contents of the extra_english.lang[br]The description works fine.[br]sdfsdfsdfg</Entry>
</CATEGORY>
</LANGUAGE>

^ Wont appear in-game.
03-03-2011 10:38 AM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #29
RE: Error when testing my map

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "prisonkeylight_1", "mansion_3", "UsedKeyOnDoor1", true)
AddUseItemCallback("", "prisonkeydark_1", "mansion_3", "UsedKeyOnDoor2", true)
}

void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("prisonkeylight_1");
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("prisonkeydark_1");
}


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

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area1" , true , 1);
AddEntityCollideCallback("Player", "AreaPlayerTeleport", "CollidePlayerTeleport", true, 1);
}

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
AddDebugMessage("You better hide!", false);
}

void Collide_Area1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("slime_anim_wall_1" , true);
}

void CollidePlayerTeleport(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_2");
FadeOut(0);
FadeIn(20);
AddDebugMessage("Welcome To the Prison World!", false);
}

Problem again Sad, i got another problem, please help again.
The error says: "Could not load script file "custom_stories/One World To Another/maps/One World To Another.hps" main (6,1) ERR :Expected ";""

One World To Another [DEMO] coming soon.
(This post was last modified: 03-05-2011 08:43 AM by Raymond.)
03-05-2011 08:40 AM
Find all posts by this user Quote this message in a reply
Oscar House Offline
Senior Member

Posts: 302
Joined: Nov 2010
Reputation: 9
Post: #30
RE: Error when testing my map

AddUseItemCallback("", "prisonkeylight_1", "mansion_3", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "prisonkeydark_1", "mansion_3", "UsedKeyOnDoor2", true);
Always remember to check your syntax, you missed the semicolons [;]

[Image: 2exldzm.png]
(This post was last modified: 03-05-2011 08:57 AM by Oscar House.)
03-05-2011 08:57 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)