Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved The player doesnt move forward.
Author Message
kartanonperuna Offline
Senior Member

Posts: 741
Joined: Oct 2011
Reputation: 8
Post: #1
The player doesnt move forward.
The bolded part doesnt seem to work.Hes supposed to walk forward till he hits the script area which activates something else.Problem is he doesnt walk.Please help me.


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "looktrigger", "Voicetrigger2", true, 1);
AddEntityCollideCallback("Player", "looktrigger2", "Voicetrigger3", true, 1);
AddEntityCollideCallback("Player", "kill", "Voicetrigger4", true, 1);
AddEntityCollideCallback("Player", "monstertrigger", "monsterthingy", true, 1);
AddEntityCollideCallback("Player", "talkandkill", "yeah", true, 1);
AddEntityCollideCallback("Player", "kill2", "yeah2", true, 1);
AddUseItemCallback("", "ceremony_knife_1", "mansion_1", "KeyOnDoor3", true);
AddUseItemCallback("", "key_study_1", "mansion_3", "KeyOnDoor4", true);
StartPlayerLookAt("lookstart", 2, 5, "");
AddEntityCollideCallback("Player", "pick", "unlock", true, 1);
AddEntityCollideCallback("Player", "what", "dude", true, 1);
SetEntityCallbackFunc("ceremony_knife_1", "BoneSawItem");
}


void BoneSawItem(string &in asEntity, string &in type)
{
StopPlayerLookAt();
}

void knife(string &in asTimer)
{
StopPlayerLookAt();
}


void dude(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "grabknife.snt", "Player", 8, false);
AddTimer("Timer_3", 8, "awakeningdude");
}


void awakeningdude(string &in asTimer)
{
SetEntityActive("pick", true);
}


void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
}

void KeyOnDoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("key_study_1");
}



void unlock(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "dagger.snt", "Player", 3, false);
}


void Voicetrigger2(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("look2", 2, 5, "");
AddTimer("Timer_3", 1, "awakening3");
SetPlayerMoveSpeedMul(0);
SetPlayerCrouching(true);
}

void awakening3(string &in asTimer)
{
PlaySoundAtEntity("", "candle.snt", "Player", 1, false);
SetEntityActive("candle", false);
SetEntityActive("candle2", true);
AddTimer("Timer_3", 1, "awakening4");
}


void awakening4(string &in asTimer)
{
StartPlayerLookAt("look1", 2, 5, "");
PlaySoundAtEntity("", "lure.snt", "Player", 20, false);
AddTimer("Timer_3", 15, "awakening5");
}

void awakening5(string &in asTimer)
{
StopPlayerLookAt();
SetEntityActive("looktrigger2", true);
SetPlayerMoveSpeedMul(1);
}

void Voicetrigger3(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("look4", 2, 5, "");
AddTimer("Timer_3", 5, "awakening6");
SetPlayerMoveSpeedMul(0);
PlaySoundAtEntity("", "huh.snt", "Player", 2, false);
}

void awakening6(string &in asTimer)
{
FadeOut(0.5);
TeleportPlayer("drop");
AddTimer("Timer_3", 3, "awakening0");
}

void awakening0(string &in asTimer)
{
StartPlayerLookAt("look5", 2, 5, "");
SetEntityActive("vase1", false);
SetEntityActive("vase2", true);
FadeIn(0.5);
AddTimer("Timer_3", 1, "awakening1");
PlaySoundAtEntity("", "vase.snt", "Player", 1, false);
}


void awakening1(string &in asTimer)
{
StartPlayerLookAt("look2", 2, 5, "");
AddTimer("Timer_3", 5, "awakeningcloset");
PlaySoundAtEntity("", "whosthere.snt", "Player", 7, false);
}

void awakeningcloset(string &in asTimer)
{
StartPlayerLookAt("lookcloset", 2, 5, "");
AddTimer("Timer_3", 3, "awakeningtele");
FadeOut(1);
}

void awakeningtele(string &in asTimer)
{
StartPlayerLookAt("look3", 2, 5, "");
FadeIn(1);
TeleportPlayer("closet");
PlaySoundAtEntity("", "brokenvase.snt", "Player", 7, false);
SetSwingDoorClosed("closet1", true, true);
SetEntityActive("block2", true);
SetEntityActive("merc2", true);
SetEntityActive("axe2", true);
SetEntityActive("kill", true);
SetEntityActive("merc", false);
SetEntityActive("axe", false);
SetPlayerMoveSpeedMul(0);
AddTimer("Timer_3", 12, "awakeningkill");
}

void awakeningkill(string &in asTimer)
{
SetPlayerMoveSpeedMul(1);
}


void awakening7(string &in asTimer)
{
StartPlayerLookAt("look6", 2, 5, "");
SetEntityActive("looktrigger2", true);
}


void Voicetrigger4(string &in asParent, string &in asChild, int alState)
{
AddTimer("Timer_3", 2, "awakeningdead");
FadeOut(0.1);
PlaySoundAtEntity("", "stab.snt", "Player", 1, false);
}


void awakeningdead(string &in asTimer)
{
FadeIn(6);
PlaySoundAtEntity("", "fall.snt", "Player", 3, false);
PlaySoundAtEntity("", "sorry.snt", "Player", 3, false);
SetEntityActive("deadmerc", true);
SetEntityActive("leg1", true);
SetEntityActive("leg2", true);
SetEntityActive("axe3", true);
SetEntityActive("merc2", false);
SetEntityActive("axe2", false);
StopPlayerLookAt();
SetEntityActive("block", false);
SetEntityActive("block2", false);
SetEntityActive("key_study_1", true);
SetEntityActive("blood", true);
SetEntityActive("blood2", true);
SetEntityActive("blood3", true);
SetEntityActive("blood4", true);
}


void monsterthingy(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("thomas", "go", 10, "");
StartPlayerLookAt("lookthomas", 2, 5, "");
MovePlayerForward(15.0f);
AddTimer("Timer_2", 1, "run");
SetPlayerActive(false);
}



void run(string &in asTimer)
{
MovePlayerForward(15.0f);
AddTimer("Timer_1", 0, "run");
}


void yeah(string &in asParent, string &in asChild, int alState)
{
MovePlayerForward(0.0f);
SetPlayerMoveSpeedMul(0);
SetPlayerRunSpeedMul(0);
RemoveTimer("Timer_1");
RemoveTimer("Timer_2");
AddTimer("Timer_3", 5, "stop");
AddTimer("Timer_3", 10, "yeah3");
}

void stop(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("thomas", false);
}


void yeah3(string &in asParent, string &in asChild, int alState)
{
MovePlayerForward(15.0f);
SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
AddTimer("Timer_3", 1, "run2");
}




void run2(string &in asTimer)
{
MovePlayerForward(15.0f);
AddTimer("Timer_3", 0, "run3");
}


void run3(string &in asTimer)
{
MovePlayerForward(15.0f);
AddTimer("Timer_3", 0, "run2");
}


void yeah2(string &in asParent, string &in asChild, int alState)
{
FadeOut(0.1);
PlaySoundAtEntity("", "stab.snt", "Player", 1, false);
}




////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic(".ogg", true, 1.0f, 1.0f, 1, false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Voice actor

Painful shadows



(This post was last modified: 03-28-2012 12:56 PM by kartanonperuna.)
03-27-2012 05:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ClayPigeon Offline
Member

Posts: 152
Joined: Mar 2012
Reputation: 6
Post: #2
RE: The player doesnt move forward.
The MovePlayerForward function was added on Justine (v1.2 update)
If you don't have it, it won't work.
Get it here:
http://www.frictionalgames.com/forum/thread-7403.html
03-27-2012 06:50 PM
Find all posts by this user Quote this message in a reply
kartanonperuna Offline
Senior Member

Posts: 741
Joined: Oct 2011
Reputation: 8
Post: #3
RE: The player doesnt move forward.
I do have it.

Voice actor

Painful shadows



03-27-2012 06:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Strembitsky Offline
Member

Posts: 243
Joined: Feb 2012
Reputation: 3
Post: #4
RE: The player doesnt move forward.
Maybe try increasing 15.0f? I have never dealt with this function before but maybe it needs to be much, much higher.

The Nightmares v1.0 - Dreadful Fires WIP
03-27-2012 07:10 PM
Find all posts by this user Quote this message in a reply
Unearthlybrutal Online
Senior Member

Posts: 691
Joined: May 2011
Reputation: 24
Post: #5
RE: The player doesnt move forward.
Tota mää käytin "When the pain is side issue part kakkosessa" ja hyvin toimi:

I used this in "When the pain is side issue part 2" and it worked fine:
Spoiler below!

void Move(string &in asTimer)
{
MovePlayerForward(3);
AddTimer("walk", 0, "Move");
}


When Life No Longer Exists
Full-conversion mod
03-27-2012 07:31 PM
Visit this user's website Find all posts by this user Quote this message in a reply
JetlinerX Offline
Senior Member

Posts: 601
Joined: Jun 2011
Reputation: 19
Post: #6
RE: The player doesnt move forward.
Sorry I cant be much help, but does that actually force the player to walk forward without key pressing?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

03-27-2012 10:14 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #7
RE: The player doesnt move forward.
(03-27-2012 10:14 PM)JetlinerX Wrote:  Sorry I cant be much help, but does that actually force the player to walk forward without key pressing?
Yeah, it does. Forces the player to walk forwards, and has to be called in a timer that recalls itself 60 times/second (Timer with 0 as a time)

03-28-2012 12:51 AM
Find all posts by this user Quote this message in a reply
Xanthos Offline
Senior Member

Posts: 322
Joined: Mar 2012
Reputation: 8
Post: #8
RE: The player doesnt move forward.
This is in the justine patch?
I keep dying in the water part.
I can't go fast enough to spin the wheel all the way around and crawl under and pull the lever.
I'm soo slow with games.

03-28-2012 02:31 AM
Find all posts by this user Quote this message in a reply
kartanonperuna Offline
Senior Member

Posts: 741
Joined: Oct 2011
Reputation: 8
Post: #9
RE: The player doesnt move forward.
What has that to do to with anything here?^
Fuck yeah!Works now.Heres the problem:


void yeah3(string &in asParent, string &in asChild, int alState)

^^^
Its supposed to be:

void yeah3(string &in asTimer)

Voice actor

Painful shadows



(This post was last modified: 03-28-2012 10:56 AM by kartanonperuna.)
03-28-2012 10:41 AM
Visit this user's website Find all posts by this user Quote this message in a reply
JetlinerX Offline
Senior Member

Posts: 601
Joined: Jun 2011
Reputation: 19
Post: #10
RE: The player doesnt move forward.
Ah crap! No idea how I didnt catch that. Hahaha.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-02-2012 05:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)