Resetting the Phonograph - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Resetting the Phonograph (/thread-10201.html) |
Resetting the Phonograph - MegaScience - 09-07-2011 I have been working on a Test Room, where I test things I am learning. Yesterday, I tried to make it more worthwhile for someone trying it. I set up the map to reset itself if you die, but I can not get the phonograph to be reusable. I'm not sure if it is even possible to reset a phonograph, but most of the map's features don't work without it. I've tried the below code, but nothing seems to let me use the phonograph again: Code: //SetMoveObjectState("phonograph_1", 0); RE: Resetting the Phonograph - MegaScience - 09-08-2011 So it is impossible, then? RE: Resetting the Phonograph - Apjjm - 09-08-2011 Is the problem with the physical state of the phonograph, or with the events attached to it? The code you have provided above only resets the physical state of the phonograph & allows interaction again, if the effected callbacks have been removed after use, or are still disabled, you need to add/enable them again, or set them not to be removed in the first place. RE: Resetting the Phonograph - MegaScience - 09-08-2011 Well, all the AutoRemove stuff is false, and the wheel doesn't turn anymore, so it shouldn't be the callback. RE: Resetting the Phonograph - Apjjm - 09-08-2011 (09-08-2011, 04:14 AM)MegaScience Wrote: Well, all the AutoRemove stuff is false, and the wheel doesn't turn anymore, so it shouldn't be the callback.So the wheel is still in the "On" state and stuck after the above code runs? Edit: Try checking the "override defaults" box on the phonograph's settings tab in the level editor and put the following in the relevant fields: minlimit: -720 maxlimit: 720 minlimit stuck: Unchecked maxlimit stuck: Unchecked SpinDir: Both ways The phonograph ent only allows spinning forward according to the .ent file, which may be preventing it from resetting properly somehow. RE: Resetting the Phonograph - MegaScience - 09-08-2011 That sort of fixed it. Now it works, but you spin it the other way after death... That's a bit awkward. Also spins a bit much now. o.o RE: Resetting the Phonograph - Apjjm - 09-08-2011 So it still isn't re-setting? ResetProp() should be working here though. If that fails, make the prop stuck in the minimum state (-1), then unstick the prop - it should have moved back to the min-state allowing you to trigger events again. You can always tweak the limit settings later to suit. It might also be worth verifying two things with the following line of code in the place where you are resetting the phonograph: Code: AddDebugMessage("pgraph: "+GetEntityExists("phonograph_1"),false); Also, i'm off for the night now. If it still isn't working after a bit of playing about with settings post up / pm me the script file (and possibly map file if you think i will need it) so I can take a closer look and reply with a fix. RE: Resetting the Phonograph - MegaScience - 09-08-2011 I'm sure it's activating, as I put all the reset commands together and as such they are resetting. I copied the names, so I know that part must be right. This is just a Test Room, where I create things in the hopes I'll sometime have enough to compose a story or donate individual elements for others. I tried setting the entity to a local variable so it'd stay the same and use that, but it didn't work. I guess I can still send you his tomorrow. RE: Resetting the Phonograph - Elven - 09-08-2011 You can always do that when you finished pulling it it starts playing voiceeffect (aka whatever comes from inside), then after it finished you tell callback that whenever voiceeffect is finished, you will set things back to normal as it was (for example). This way you can do loop. RE: Resetting the Phonograph - MegaScience - 09-08-2011 The problem is getting it to reset, not the command in which to put the reset. |