I recently started learning to use the HPL editor, and I've run in to some serious issues when attempting scripting.
First off, here are my script files:
Quote: <LANGUAGE>
<RESOURCES />
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">
Test
</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Test01_Name">
</Entry>
<Entry Name="Note_Test01_Text">
</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_prisondoorkey">
This key will open a specific prison door
</Entry>
<Entry Name="ItemName_prisondoorkey">
Prison Door Key
</Entry>
</CATEGORY>
</LANGUAGE>
And the .hps:
Quote: ////////////////////////
// Run when Starting
void OnStart()
{
AddUseItemCallback("", "prisondoorkey_1", "prisondoor_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in prisondoorkey_1, string &in prisondoor_1)
{
SetSwingDoorLocked(prisondoor_1, false, true);
PlaySoundAtEntity("", "unlock_door", prisondoor_1, 0, false);
RemoveItem(prisondoorkey_1);
}
////////////////////////
// Run when leaving map
void OnLeave()
{
}
These both WORK in game. I can use my key, open the door. All is good.
However, my level will no longer update properly.
There is only one room in the level, containing the door, the key and some various objects (floors, walls, props..). When I leave the room, there are some floor tiles leading to blackness. When I started adding a roof to the room, and more floors and walls to the next area, none of them would show ingame. Nor did they seem to exist (I could still fall through the blackness, in other words, there was no floor).
I added a light to the second area, which seemed to work and light up the floor. But the new floor (not the original floor connected with the first room) still won't show, or exist.
I tried adding objects to the first room and that works just fine, but the roof still won't show.
I have tried this so far:
-Rewriting the .lang and .hps files from scratch. At one time I used the HPLlang editor to try that as well.
-Creating a completely new level from scratch. The level I am describing is my second level. Nothing was copied from the last attempt.
I seem to be running in to this issue when I start using scripts. Any help is greatly appreciated.
Any questions can be directed to me here, or on my skype: LiVamxz
Thanks a ton