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
Lever Opening a Bookcase [SOLVED]
Thor Offline
Junior Member

Posts: 12
Threads: 1
Joined: Oct 2011
Reputation: 0
#11
RE: Lever Opening a Bookcase

(10-30-2011, 07:08 AM)flamez3 Wrote:
(10-30-2011, 05:33 AM)Thor Wrote:
(10-30-2011, 05:15 AM)flamez3 Wrote: One more suggestion, have you made a scriptarea for where the bookcase is supposed to follow?
I made the area the tutorial indicated I should and set it as the angular offset area for the shelf.
Is there another area I need for this script to work?
Uh.....no, I don't think so, maybe you should restart and do the tutorial again.
Well I found the problem: in the hpl.log file it says that the script file does not exist even though it's very clearly sitting in the same folder as the map file which it finds and opens with no problem.

That said I'm not really sure how to go about fixing this unless there's something syntactically wrong with my script file (it is supposed to be "mapname.hps" where "mapname" is the name of the map right?)
10-30-2011, 07:21 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#12
RE: Lever Opening a Bookcase

(10-30-2011, 07:21 AM)Thor Wrote:
(10-30-2011, 07:08 AM)flamez3 Wrote:
(10-30-2011, 05:33 AM)Thor Wrote:
(10-30-2011, 05:15 AM)flamez3 Wrote: One more suggestion, have you made a scriptarea for where the bookcase is supposed to follow?
I made the area the tutorial indicated I should and set it as the angular offset area for the shelf.
Is there another area I need for this script to work?
Uh.....no, I don't think so, maybe you should restart and do the tutorial again.
Well I found the problem: in the hpl.log file it says that the script file does not exist even though it's very clearly sitting in the same folder as the map file which it finds and opens with no problem.

That said I'm not really sure how to go about fixing this unless there's something syntactically wrong with my script file (it is supposed to be "mapname.hps" where "mapname" is the name of the map right?)
Exact same as the map name:

mapname.map
mapname.hps

And it is supposed to be the same folder as the map.

Is that your whole script you posted? Because something could be making it wrong. Post your entire script.

10-30-2011, 07:39 AM
Find
Thor Offline
Junior Member

Posts: 12
Threads: 1
Joined: Oct 2011
Reputation: 0
#13
RE: Lever Opening a Bookcase

(10-30-2011, 07:39 AM)flamez3 Wrote:
(10-30-2011, 07:21 AM)Thor Wrote:
(10-30-2011, 07:08 AM)flamez3 Wrote:
(10-30-2011, 05:33 AM)Thor Wrote:
(10-30-2011, 05:15 AM)flamez3 Wrote: One more suggestion, have you made a scriptarea for where the bookcase is supposed to follow?
I made the area the tutorial indicated I should and set it as the angular offset area for the shelf.
Is there another area I need for this script to work?
Uh.....no, I don't think so, maybe you should restart and do the tutorial again.
Well I found the problem: in the hpl.log file it says that the script file does not exist even though it's very clearly sitting in the same folder as the map file which it finds and opens with no problem.

That said I'm not really sure how to go about fixing this unless there's something syntactically wrong with my script file (it is supposed to be "mapname.hps" where "mapname" is the name of the map right?)
Exact same as the map name:

mapname.map
mapname.hps

And it is supposed to be the same folder as the map.

Is that your whole script you posted? Because something could be making it wrong. Post your entire script.
This is my first foray into scripting so all I've got is the one function.

void OnStart()
{
void SetEntityConnectionStateChangeCallback(string& "lever", string& "func_shelf");
}


void func_shelf(string &in asEntity, int alState)
{
    if (alState == 1)
    {
    SetMoveObjectState(string& "shelf", float 1.0);
    PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1.snt", 0, false);
          return;
    }
}

and this is the error I get in the hpl file:

Quote: ERROR: Script file C:\Program Files (x86)\Steam\steamapps\common\amnesia the dark descent\maps\mymaps\room1\room1.hps does not exist!
10-30-2011, 04:52 PM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#14
RE: Lever Opening a Bookcase

Do you have this a dev Enviorment? or is it just standard Amnesia?

If it's standard Amnesia, but all your files (for you map) in the Custom Storys Folder, instead of the Maps folder

-Grey Fox

Current Project
Forgotten
10-30-2011, 05:43 PM
Find
Thor Offline
Junior Member

Posts: 12
Threads: 1
Joined: Oct 2011
Reputation: 0
#15
RE: Lever Opening a Bookcase

(10-30-2011, 05:43 PM)GreyFox Wrote: Do you have this a dev Enviorment? or is it just standard Amnesia?

If it's standard Amnesia, but all your files (for you map) in the Custom Storys Folder, instead of the Maps folder

-Grey Fox
Dev Environment

would I need to change the file permissions on the script?


10-30-2011, 05:45 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#16
RE: Lever Opening a Bookcase

.......To be honest, I would make it like this:


Amnesia/Custom_Stories/Yourcustomstory/maps/ch01/room1.map and room1.hps <----they go in there, if I read correctly you said that you have a folder for each room. Don't do that, try what I said above and post what happens.

10-31-2011, 01:13 AM
Find
Thor Offline
Junior Member

Posts: 12
Threads: 1
Joined: Oct 2011
Reputation: 0
#17
RE: Lever Opening a Bookcase

(10-31-2011, 01:13 AM)flamez3 Wrote: .......To be honest, I would make it like this:


Amnesia/Custom_Stories/Yourcustomstory/maps/ch01/room1.map and room1.hps <----they go in there, if I read correctly you said that you have a folder for each room. Don't do that, try what I said above and post what happens.
I just have the one room to test scripts in here's the folder:


.png   screen.png (Size: 46.85 KB / Downloads: 162)

and here's the log file:
Version 1.20
-------- THE HPL ENGINE LOG ------------
Engine build ID 20101021192547

Creating Engine Modules
--------------------------------------------------------
Creating graphics module
Creating system module
Creating resource module
Creating input module
Creating sound module
Creating physics module
Creating ai module
Creating gui module
Creating generate module
Creating haptic module
Creating scene module
--------------------------------------------------------

Initializing Resources Module
--------------------------------------------------------
Creating loader handlers
Creating resource managers
Adding loaders to handlers
--------------------------------------------------------

Initializing Graphics Module
--------------------------------------------------------
Init lowlevel graphics: 1280x720 bpp:32 fs:0 ms:0 gpufmt:2 cap:'Amnesia - The Dark Descent - Loading...' pos:(-1x-1)
Setting video mode: 1280 x 720 - 32 bpp
Init Glew...OK
Setting up OpenGL
  Vendor: NVIDIA Corporation
  Renderer: GeForce 9500 GT/PCI/SSE2
  Version: 3.3.0
  Max texture image units: 32
  Max texture coord units: 8
  Max user clip planes: 8
  Two sided stencil: 1
  Vertex Buffer Object: 1
  Anisotropic filtering: 1
  Max Anisotropic degree: 16
  Multisampling: 1
  Texture compression: 1
  Texture compression S3TC: 1
  Auto generate MipMaps: 1
  Render to texture: 1
  Max draw buffers: 8
  Max color render targets: 8
  Packed depth-stencil: 1
  Texture float: 1
  GLSL Version: 3.30 NVIDIA via Cg compiler
  ShaderModel 2: 1
  ShaderModel 3: 1
  ShaderModel 4: 1
  OGL ATIFragmentShader: 0
Setting up G-Bugger: type: 0 texturenum: 3
Adding engine materials
Initializing DevIL
  Vendor String: Abysmal Software
  Version String: Developer's Image Library (DevIL) 1.6.8pre Aug 12 2006
  Version Number: 168
Adding engine post effects
--------------------------------------------------------

Initializing Sound Module
--------------------------------------------------------
Initializing OpenAL
  Available OpenAL devices:
   0. Generic Software on Speakers (High Definition Audio Device)(OpenAL default)
   1. Generic Software on Headphones (High Definition Audio Device)
   2. Generic Software on Digital Audio (S/PDIF) (High Definition Audio Device)
   3. Generic Software on Digital Audio (HDMI) (High Definition Audio Device)
  Trying to open device 'Generic Software on Speakers (High Definition Audio Device)'... Success!
  Number of mono sources: 32
  Streaming setup: 4 Buffers x 262144 bytes each
--------------------------------------------------------

Initializing Game Module
--------------------------------------------------------
Adding engine updates
Initializing script functions
--------------------------------------------------------

User Initialization
--------------------------------------------------------
Setting profile: 'dev_user' Path: 'C:\Users\Thor\Documents/Amnesia/Main/dev_user/'
ERROR: Script file C:\Program Files (x86)\Steam\steamapps\common\amnesia the dark descent\custom_stories\maps\test\room1.hps does not exist!
-------- Loading map 'room1.map' ---------
    Cache Loading: 230 ms
  Entities: 209 ms
  Compilation: 0 ms
  Total: 450 ms
  Meshes created: 4
  Bodies created: 4
-------- Loading complete ---------
--------------------------------------------------------

Game Running
--------------------------------------------------------
--------------------------------------------------------

Statistics
--------------------------------------------------------
Medium framerate: 44.322767
--------------------------------------------------------

User Exit
--------------------------------------------------------
Deleting game modules.
   'LuxInputHandler'
   'LuxHelpFuncs'
   'LuxSaveHandler'
   'LuxScriptHandler'
   'LuxProgressLogHandler'
   'LuxMapHandler'
   'LuxMapHelper'
   'LuxPlayer'
   'LuxInsanityHandler'
   'LuxDebugHandler'
   'LuxEffectRenderer'
   'LuxMusicHandler'
   'LuxMusicHandler'
   'LuxEffectHandler'
   'LuxCompletionCountHandler'
   'LuxGlobalDataHandler'
   'LuxHintHandler'
   'LuxPostEffectHandler'
   'LuxPreMenu'
   'LuxDebugHandler'
   'LuxInventory'
   'LuxJournal'
   'LuxCredits'
   'LuxLoadScreenHandler'
Deleting config files.
--------------------------------------------------------

Exiting Gui Module
--------------------------------------------------------
Deleting all sets
Deleting all skins
Deleting all gfx elements
Deleting all materials
--------------------------------------------------------

Exiting Generate Module
--------------------------------------------------------
--------------------------------------------------------

Exiting Scene Module
--------------------------------------------------------
--------------------------------------------------------

Exiting Input Module
--------------------------------------------------------
--------------------------------------------------------

Exiting Sound Module
--------------------------------------------------------
--------------------------------------------------------

Exiting Graphics Module
--------------------------------------------------------
--------------------------------------------------------

Exiting Resources Module
--------------------------------------------------------
Done with fonts
Done with scripts
Done with particles
Done with sounds
Done with meshes
Done with materials
Done with Gpu programs
Done with images
Destroyed all textures
Done with sound entities
Done with animations
Done with ent files
All resources deleted
--------------------------------------------------------

Exiting Physics Module
--------------------------------------------------------
--------------------------------------------------------

Exiting System Module
--------------------------------------------------------
--------------------------------------------------------

Deleting game setup provided by user
- Deleting lowlevel stuff.
  Physics
  Sound
  Input
  Resources
  System
  Graphics
  Haptic
HPL Exit was successful!

|--Memory Manager Report-------------------------------|
|
| No memory leaks detected. Memory left: 0
|
|------------------------------------------------------|


(This post was last modified: 10-31-2011, 01:30 AM by Thor.)
10-31-2011, 01:27 AM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#18
RE: Lever Opening a Bookcase

Do mean a favor open that folder up and press "Alt", Go to tools and folder options, then go to the view Tab. and Look for "Hide Extensions for Known File Types", and Uncheck mark it and hit apply.

You'll see your .HPS file will say. room1.hps.txt

Erase the .txt and A Pop up will appear click yes. then test your script.

-Grey Fox

Current Project
Forgotten
10-31-2011, 01:56 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#19
RE: Lever Opening a Bookcase

(10-31-2011, 01:56 AM)GreyFox Wrote: Do mean a favor open that folder up and press "Alt", Go to tools and folder options, then go to the view Tab. and Look for "Hide Extensions for Known File Types", and Uncheck mark it and hit apply.

You'll see your .HPS file will say. room1.hps.txt

Erase the .txt and A Pop up will appear click yes. then test your script.

-Grey Fox
There you go, It's not a HPS file, it's a Text document at the moment, do what Grey said and it should work.

10-31-2011, 02:05 AM
Find
Thor Offline
Junior Member

Posts: 12
Threads: 1
Joined: Oct 2011
Reputation: 0
#20
RE: Lever Opening a Bookcase

(10-31-2011, 01:56 AM)GreyFox Wrote: Do mean a favor open that folder up and press "Alt", Go to tools and folder options, then go to the view Tab. and Look for "Hide Extensions for Known File Types", and Uncheck mark it and hit apply.

You'll see your .HPS file will say. room1.hps.txt

Erase the .txt and A Pop up will appear click yes. then test your script.

-Grey Fox
Thank you kind sir.
I'm still getting the same error though :/

10-31-2011, 02:12 AM
Find




Users browsing this thread: 5 Guest(s)