Blog | About | Contact | Submit Mod | Join Mod DB | Site Map | Media Kit | Desura | RSS
| Posts | ||
|---|---|---|
| Amnesia Custom Story help anyone?? | Post Reply | |
| Thread Options | ||
|
|
Sep 6 2012, 4:54am Anchor | |
|
So, people, I need some help... I am trying to solve an "Unexpected end of file" problem. I am getting this error: FATAL ERROR: Could not load script file "custom_stories/Calm Terror/maps/04_dungeons.hps! Also, here is the whole .hps file code: code: ////////////////////////////
// Run when the map starts void OnStart() { AddEntityCollideCallback("Player", "Monster_script_10", "SpawnEnemy", true, 1); AddEntityCollideCallback("Player", "WaterLurker_script", "SpawnEnemy2", true, 1); AddEntityCollideCallback("Player", "PopUp_2", "EnableMessage2", true, 1); AddEntityCollideCallback("Player", "PopUp_3", "EnableMessage3", true, 1); } void SpawnEnemy(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_brute_1", true); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, ""); } void SpawnEnemy2(string &in asParent, string &in asChild, int alState) { SetEntityActive("waterlurker_1", true); } void EnableMessage2(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "PopUp2", 0); } void EnableMessage3(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "PopUp3, 0); } //////////////////////////// // Run when entering map void OnEnter() { AddEntityCollideCallback("Player", "Music_area_1", "StartMusic", true, 1); } void StartMusic(string &in asParent, string &in asChild, int alState) { PlayMusic("21_amb.ogg", true, 0.8, 2, 1, true); } //////////////////////////// // Run when leaving map void OnLeave() { } Please help me, I was searching everywhere for answers and could not solve this... Thank you for your help in advance!! |
||
|
|
Sep 7 2012, 1:40am Anchor | |
|
code: SetMessage("Messages", "PopUp3, 0);
--
|
||
|
|
Sep 7 2012, 3:16am Anchor | |
|
Wow, thank you so much ShiftedDesign!! It solved the problem! Now I can continue my work... |
||
|
|
Sep 7 2012, 11:10am Anchor | |
|
Not a problem, good luck in your work! Also I recommend using a program such as Context or Notepad++ which has color highlights for specific items. Edited by: ShiftedDesign --
|
||
| Jan 10 2013, 3:05pm Anchor | ||
|
Hi i was wondering if you could help me with an issue that i have with amnesia, Im trying to make a custom story (its just a tester as i have never made one before and just getting the hang of things.) When i load it i get his message saying fatal error: could not load script file 'custom_stories/tester/maps/tester.hps'! main (1,1) : ERR : unexpected token '<' this is the hps file so any help would be very much appreciated. thank you code: <Level>
<EditorSession> <Performance CamClipPlanes="0.05 1000" LightsActive="true" PSActive="true" ShowFog="true" ShowSkybox="true" WorldReflection="true" /> <ViewportConfig BGColor="0.2 0.2 0.2 1" GAmbientLight="true" GPointLight="true" GridSnap="true" GridSnapSeparation="0.25" SelectedViewport="0" UsingEnlargedViewport="false"> <Viewport CameraPosition="0 0 180" CameraTarget="0 0 0" CameraZoom="0" GridHeight="0" GridPlane="2" Preset="0" RenderMode="1" ShowAxes="true" ShowGrid="true" UsingLTCam="true" /> <Viewport CameraPosition="180 0 0" CameraTarget="0 0 0" CameraZoom="0" GridHeight="0" GridPlane="0" Preset="1" RenderMode="1" ShowAxes="true" ShowGrid="true" UsingLTCam="true" /> <Viewport CameraPosition="0 180 0" CameraTarget="0 0 0" CameraZoom="0" GridHeight="0" GridPlane="1" Preset="2" RenderMode="1" ShowAxes="true" ShowGrid="true" UsingLTCam="true" /> <Viewport CameraPosition="10 10 10" CameraTarget="0 0 0" CameraZoom="1.06013" GridHeight="0" GridPlane="1" Preset="3" RenderMode="0" ShowAxes="true" ShowGrid="true" UsingLTCam="true" /> </ViewportConfig> <Groups> <Group ID="0" Name="None" Visible="true" /> </Groups> </EditorSession> <MapData FogActive="false" FogColor="1 1 1 1" FogCulling="true" FogEnd="20" FogFalloffExp="1" FogStart="0" GlobalDecalMaxTris="300" Name="" SkyBoxActive="false" SkyBoxColor="1 1 1 1" SkyBoxTexture=""> <MapContents> <FileIndex_StaticObjects NumOfFiles="0" /> <FileIndex_Entities NumOfFiles="0" /> <FileIndex_Decals NumOfFiles="0" /> <StaticObjects /> <Primitives /> <Decals /> <Entities /> <Misc /> <StaticObjectCombos /> </MapContents> </MapData> </Level> |
||
|
|
Jan 12 2013, 7:25pm Anchor | |
|
I don't actually work with Amnesia so I don't know how helpful I will be but, how can your .hps file look like that when the other guys looked like this: code: ////////////////////////////
// Run when the map starts void OnStart() { AddEntityCollideCallback("Player", "Monster_script_10", "SpawnEnemy", true, 1); AddEntityCollideCallback("Player", "WaterLurker_script", "SpawnEnemy2", true, 1); AddEntityCollideCallback("Player", "PopUp_2", "EnableMessage2", true, 1); AddEntityCollideCallback("Player", "PopUp_3", "EnableMessage3", true, 1); } void SpawnEnemy(string &in asParent, string &in asChild, int alState) --
|
||
| Jan 20 2013, 8:58am Anchor | ||
|
i sorted it now but thanks anyway |
||
| Mar 3 2013, 8:07am Anchor | ||
|
Alright I've got the same problem and this is how my hps fle looks like ////////////////////////////// Run when entering mapvoid OnEnter(){AddUseItemCallBack("","GuestRoomKey,"mansion_1","UsedKeyOnDoor", true);}void UsedKeyOnDoor(string &in asItem, string &in asEntity{ SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity"", "Unlock_door", "mansion_1",0, false); RemoveItem("GuestRoomKey");} ////////////////////////////// Run when leaving mapvoid OnLeave(){ } |
||
|
|
Mar 4 2013, 1:05pm Anchor | |
|
code: ////////////////////////////// Run when entering mapvoid
OnEnter() { AddUseItemCallBack("","GuestRoomKey,"mansion_1","UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity"", "Unlock_door", "mansion_1",0, false); RemoveItem("GuestRoomKey"); } ////////////////////////////// Run when leaving mapvoid OnLeave() { } Edited by: ShiftedDesign --
|
||
Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.