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
what do i need to do...
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
what do i need to do...

i want that player is walking "slower"
because i made something... afterp ulling a lever a wall is going up... and a music will come.. some music that it looks like it's the end and then there is outside... andthe music is long... i want that player CAN'T run... for that time... what's the script for player walk... (not run Sad )
|( but it's not the end of the game Big Grin )
08-21-2014, 04:55 PM
Find
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#2
RE: what do i need to do...

Hello there!
This page may be very helpful to you in the future. But to answer your question:
SetPlayerWalkSpeedMul(0.7)
SetPlayerRunSpeedMul(0.4)

Or you could use
SetPlayerMoveSpeedMul(0.5)

You can replace the numbers in the brackets with whatever you want. Higher than one is faster than normal, lower than one is slower than normal.

[Image: quote_by_rueppells_fox-d9ciupp.png]
08-21-2014, 05:05 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#3
RE: what do i need to do...

I'm guessing you mean this?

void SetPlayerMoveSpeedMul(float afMul);
void SetPlayerRunSpeedMul(float afMul);
void SetPlayerLookSpeedMul(float afMul);

Changes the player's move/run/look speed. Default is 1.

Derp.
08-21-2014, 05:06 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#4
RE: what do i need to do...

thanks Big Grin but it keep saying error end of file or something ? my script
PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""Cellar""CellarDoor""UsedKeyOnDoor"true);
AddUseItemCallback("""Mes""Barrel""Killperson"true); 
PlayMusic("Kasteel"true0.7f10false);
}


void MoveWall(string &in asEntityint alState
{
    if (
alState == -1)
    {
        
SetMoveObjectState("MoveWall"1);
        
SetLeverStuckState("secretlever", -1false);
        
PlaySoundAtEntity("""quest_completed.snt""MoveWall"0false);
                
StopMusic(51);
                
PlayMusic("Outside"true0.7f10false);
                
SetPlayerMoveSpeedMul(0.5)

    }

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
SetLevelDoorLocked("CellarDoor"false); 
PlaySoundAtEntity("""unlock_door.snt""CellarDoor"0false);
RemoveItem("Cellar");


void BarrelCreak(string&in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("""break_wood.snt""Barrel"0.5ffalse);
SetPropHealth("Barrel"0);
}

void Killperson(string &in asItemstring &in asEntity)
{
PlaySoundAtEntity("""19_inject.snt""Player"0false);
CreateParticleSystemAtEntity("""ps_blood_tiny_splash.ps""Barrel"false);
SetEntityActive("secretlever"true);

08-21-2014, 05:12 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#5
RE: what do i need to do...

No bracket at SetPlayerMoveSpeedMul.

Also you're missing a } closing this script.

Needs to be like this:

void MoveWall(string &in asEntity, int alState)
{
    if (alState == -1)
    {
        SetMoveObjectState("MoveWall", 1);
        SetLeverStuckState("secretlever", -1, false);
        PlaySoundAtEntity("", "quest_completed.snt", "MoveWall", 0, false);
                StopMusic(5, 1);
                PlayMusic("Outside", true, 0.7f, 1, 0, false);
                SetPlayerMoveSpeedMul(0.5);

    }
}

Derp.
(This post was last modified: 08-21-2014, 05:16 PM by Neelke.)
08-21-2014, 05:15 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#6
RE: what do i need to do...

Thnaks Big Grin it worked Tongue
Wink
08-21-2014, 05:24 PM
Find




Users browsing this thread: 1 Guest(s)