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
Script Help MovePlayerHeadPos (NVM)
Verkehr Offline
Member

Posts: 60
Threads: 13
Joined: Oct 2016
Reputation: 1
#1
MovePlayerHeadPos (NVM)

(3rd post in a row, forever alone)

I keep having problems with the MovePlayerHeadPos command. I want the head to spawn as it's a bit below the regular level and then regulate itself back, but the head stays in the regular height!

void OnStart()
{  
    MovePlayerHeadPos(0, -0.5, 0, 1, 0);
    FadePlayerRollTo(-45, 100, 100);
    AddTimer("", 2, "standUp");
    AddTimer("", 3, "unlockMove");
    FadeOut(0);
    FadeIn(3);
    SetPlayerSanity(20);
    SetPlayerHealth(40);
    SetPlayerActive(false);
    AddUseItemCallback("", "key1_1", "door1_1", "multiDoor1", false);
    SetLocalVarInt("multiDoor", 0);
    SetEntityInteractionDisabled("hanging_lantern_wall_1", true);
}

void standUp(string &in asTimer){
    MovePlayerHeadPos(0, 0, 0, 0.5, 0);
    FadePlayerRollTo(0, 20, 20);
}

void unlockMove(string &in asTimer){
    SetPlayerActive(true);
    SetMessage("ScrText", "text1_1", 6);
}

Any help? :/

Note: it worked BEFORE I added the timers...
(This post was last modified: 12-16-2017, 11:21 PM by Verkehr.)
12-15-2017, 09:26 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: MovePlayerHeadPos

The code looks okay to me just by glancing over it. Maybe try temporarily commenting out (prefix // at the start of the same line as) the two fade functions and make sure that the head isn't keeping to the same height this way. Is your roll working? Because they both fix themselves at a similar time, which may also give an illusion to how low the head actually is.

Also, feel free to post about continuous development issues on your same threads if they are still relatively new. Not that you're doing anything wrong, but it may be easier for you to keep track of them later in future if you hit the same issue. Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 12-16-2017, 01:10 AM by Romulator.)
12-16-2017, 01:09 AM
Find
Verkehr Offline
Member

Posts: 60
Threads: 13
Joined: Oct 2016
Reputation: 1
#3
RE: MovePlayerHeadPos

(12-16-2017, 01:09 AM)Romulator Wrote: The code looks okay to me just by glancing over it. Maybe try temporarily commenting out (prefix // at the start of the same line as) the two fade functions and make sure that the head isn't keeping to the same height this way. Is your roll working? Because they both fix themselves at a similar time, which may also give an illusion to how low the head actually is.

Also, feel free to post about continuous development issues on your same threads if they are still relatively new. Not that you're doing anything wrong, but it may be easier for you to keep track of them later in future if you hit the same issue. Smile

Of course! I always comment inside of the same thread if it's about the issue.
EDIT: After thinking a bit, I understood what you said. I always unsubscribe from threads that do not carry any problems for me anymore, plus I mostly just then get replies about any questions I asked that are optional and/or for future knowledge.
I just feel more comfortable making a new thread for a new type of problem, though I WOULD post a new problem RELATED to a previous thread in the appropriate thread's replies and hope for an answer. If none comes, I guess then, make a new thread.

The head roll actually works, it's only the head height that doesn't go as planned. I'll try it though.
(This post was last modified: 12-16-2017, 01:11 PM by Verkehr.)
12-16-2017, 12:38 PM
Find
Verkehr Offline
Member

Posts: 60
Threads: 13
Joined: Oct 2016
Reputation: 1
#4
RE: MovePlayerHeadPos

AGH!

Excuse my stupidity, it actually worked all the time. It's just hard to notice because (I assume) of the low value that's set in the code above and the distant walls not changing much..
That can be proven by just rotating the player spawn position to the table (there's a desk behind the player's regular face direction). It's clearly working, just barely noticeable.

#forgivemesenpai
(This post was last modified: 12-16-2017, 11:20 PM by Verkehr.)
12-16-2017, 11:20 PM
Find




Users browsing this thread: 3 Guest(s)