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
Resetting the Phonograph
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#1
Resetting the Phonograph

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:

    //SetMoveObjectState("phonograph_1", 0);
    SetWheelStuckState("phonograph_1", 0, false);
    SetEntityInteractionDisabled("phonograph_1", false);
    ResetProp("phonograph_1");
    //SetMoveObjectStateExt("phonograph_1", 0, 5, 15, 5, true);
(This post was last modified: 09-12-2011, 11:45 AM by MegaScience.)
09-07-2011, 02:04 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#2
RE: Resetting the Phonograph

So it is impossible, then? Confused
09-08-2011, 03:11 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#3
RE: Resetting the Phonograph

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.
(This post was last modified: 09-08-2011, 04:15 AM by Apjjm.)
09-08-2011, 04:10 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#4
RE: Resetting the Phonograph

Well, all the AutoRemove stuff is false, and the wheel doesn't turn anymore, so it shouldn't be the callback.
09-08-2011, 04:14 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: Resetting the Phonograph

(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.
(This post was last modified: 09-08-2011, 04:22 AM by Apjjm.)
09-08-2011, 04:15 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#6
RE: Resetting the Phonograph

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
09-08-2011, 04:32 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#7
RE: Resetting the Phonograph

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:
AddDebugMessage("pgraph: "+GetEntityExists("phonograph_1"),false);
If no message shows up, the code isn't running (which makes this problem very easy to solve Wink). If false shows up you have a naming mismatch. If true shows up, ResetProp() isn't working or the wheel is somehow being moved back to the max state after being reset.

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.
(This post was last modified: 09-08-2011, 04:44 AM by Apjjm.)
09-08-2011, 04:36 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#8
RE: Resetting the Phonograph

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.
09-08-2011, 05:26 AM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#9
RE: Resetting the Phonograph

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.

The Interrogation
Chapter 1

My tutorials
09-08-2011, 08:59 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#10
RE: Resetting the Phonograph

The problem is getting it to reset, not the command in which to put the reset.
09-08-2011, 11:33 AM
Find




Users browsing this thread: 1 Guest(s)