Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help I would very much like some help please!
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
Shocked  I would very much like some help please!

Ok guys i worked on some WakeUp like you are in bed and i wanna wake up followed some tut on yt but let's see what is problem

When maps load it's come black screen and it stay like that :O
Angry
So like player is blind :O see my .hps

Spoiler below!
PHP Code: (Select All)
void OnStart()
{
     
FadeOut(0);
    
FadePlayerRollTo(652020);
    
MovePlayerHeadPos(-1, -0.45, -1.1201);
    
AddTimer("ActivatePlayer"3"FadeIn");
    
SetLightVisible("BoxLight_1"false);
    
FadeImageTrailTo(31);
    
FadeRadialBlurTo(11);
}



----------------------------------------------------------------------

and

void WakeUp(string &in timer_name)
{
     if(
timer_name == "Start")
    {
         
SetLightVisible("BoxLight_1"true);
         
AddTimer("MoveHead"1"WakeUp");
    }
    
    else if (
timer_name == "MoveHead")
    {
         
FadeImageTrailTo(01);
         
FadeRadialBlurTo(11);
         
MovePlayerHeadPos(-0.5, -0.2, -1.122);
         
FadePlayerRollTo(01.7500);
         
AddTimer("ActivatePlayer"2"WakeUp");
    }

    else if (
timer_name == "ActivatePlayer")
    {
        
MovePlayerHeadPos(00022);
        
SetPlayerActive(true);
    }



(This post was last modified: 10-28-2014, 11:49 AM by Straxedix.)
03-23-2014, 08:09 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#2
RE: Wtf ??? Never srsly never see this :O

Try This

PHP Code: (Select All)
void OnStart()
{
FadeOut(0);
FadePlayerRollTo(652020);
MovePlayerHeadPos(-1, -0.45, -1.1201);
AddTimer("ActivatePlayer"3"FadeIn");
SetLightVisible("BoxLight_1"false);
FadeImageTrailTo(31);
FadeRadialBlurTo(11);


PHP Code: (Select All)
void WakeUp(string &in timer_name)
{
FadeIn(4);
if(
timer_name == "Start")
{
SetLightVisible("BoxLight_1"true);
AddTimer("MoveHead"1"WakeUp");
}

else if (
timer_name == "MoveHead")
{
FadeImageTrailTo(01);
FadeRadialBlurTo(11);
MovePlayerHeadPos(-0.5, -0.2, -1.122);
FadePlayerRollTo(01.7500);
AddTimer("ActivatePlayer"2"WakeUp");
}

else if (
timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(00022);
SetPlayerActive(true);
}


You forgot to add in a fade in, if it works then why not give me reputation! If you want

(This post was last modified: 03-23-2014, 08:15 PM by Radical Batz.)
03-23-2014, 08:11 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
RE: Wtf ??? Never srsly never see this :O

Nope still not working.

And can anyone fix that but to have text WHEN WAKE UP to come "How i get in here?? I know this place"

I give Reputation+ hwo make this to work

(This post was last modified: 03-23-2014, 08:28 PM by Straxedix.)
03-23-2014, 08:23 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
RE: Wtf ??? Never srsly never see this :O

void OnStart()
{
FadeOut(0);
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("ActivatePlayer", 3, "FadeIn");
SetLightVisible("BoxLight_1", false);
FadeImageTrailTo(3, 1);
FadeRadialBlurTo(1, 1);
}

void WakeUp(string &in timer_name)
{
if(timer_name == "Start")
{
SetLightVisible("BoxLight_1", true);
FadeIn(4);
AddTimer("MoveHead", 1, "WakeUp");
}

else if (timer_name == "MoveHead")
{
FadeImageTrailTo(0, 1);
FadeRadialBlurTo(1, 1);
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}

else if (timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}
}

Try this.

Derp.
03-23-2014, 08:28 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: Wtf ??? Never srsly never see this :O

Try this to make the text appear after wakeup

PHP Code: (Select All)
void OnStart()
{
FadeOut(0);
FadePlayerRollTo(652020);
MovePlayerHeadPos(-1, -0.45, -1.1201);
AddTimer("ActivatePlayer"3"FadeIn");
SetLightVisible("BoxLight_1"false);
FadeImageTrailTo(31);
FadeRadialBlurTo(11);
}


void WakeUp(string &in timer_name)
{
if(
timer_name == "Start")
{
SetLightVisible("BoxLight_1"true);
FadeIn(4);
AddTimer("MoveHead"1"WakeUp");
}

else if (
timer_name == "MoveHead")
{
FadeImageTrailTo(01);
FadeRadialBlurTo(11);
MovePlayerHeadPos(-0.5, -0.2, -1.122);
FadePlayerRollTo(01.7500);
AddTimer("ActivatePlayer"2"WakeUp");
}

else if (
timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(00022);
SetPlayerActive(true);
SetMessage("CATEGORYOFYOURLANG""ENTRYOFYOURMESSAGE"3);
}


(This post was last modified: 03-23-2014, 08:32 PM by Radical Batz.)
03-23-2014, 08:29 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#6
RE: Wtf ??? Never srsly never see this :O

(03-23-2014, 08:28 PM)Neelke Wrote:
void OnStart()
{
FadeOut(0);
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("ActivatePlayer", 3, "FadeIn");
SetLightVisible("BoxLight_1", false);
FadeImageTrailTo(3, 1);
FadeRadialBlurTo(1, 1);
}

void WakeUp(string &in timer_name)
{
if(timer_name == "Start")
{
SetLightVisible("BoxLight_1", true);
FadeIn(4);
AddTimer("MoveHead", 1, "WakeUp");
}

else if (timer_name == "MoveHead")
{
FadeImageTrailTo(0, 1);
FadeRadialBlurTo(1, 1);
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}

else if (timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}
}

Try this.

Did i make so many errors ?? need my position of PlayerStartArea_1 ?? and no it's not working

(03-23-2014, 08:29 PM)Badcat5550 Wrote: Try this to make the text appear after wakeup

PHP Code: (Select All)
void OnStart()
{
FadeOut(0);
FadePlayerRollTo(652020);
MovePlayerHeadPos(-1, -0.45, -1.1201);
AddTimer("ActivatePlayer"3"FadeIn");
SetLightVisible("BoxLight_1"false);
FadeImageTrailTo(31);
FadeRadialBlurTo(11);
}


void WakeUp(string &in timer_name)
{
if(
timer_name == "Start")
{
SetLightVisible("BoxLight_1"true);
FadeIn(4);
AddTimer("MoveHead"1"WakeUp");
}

else if (
timer_name == "MoveHead")
{
FadeImageTrailTo(01);
FadeRadialBlurTo(11);
MovePlayerHeadPos(-0.5, -0.2, -1.122);
FadePlayerRollTo(01.7500);
AddTimer("ActivatePlayer"2"WakeUp");
}

else if (
timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(00022);
SetPlayerActive(true);
SetMessage("CATEGORYOFYOURLANG""ENTRYOFYOURMESSAGE"3);
}


First to fix this then SetMessage Sad

Edit:
So i make something that no one can fix ???

Edit2:
I try like him

http://www.youtube.com/watch?v=WWLgrSIbxYU

followed that tut

(This post was last modified: 03-23-2014, 08:52 PM by Straxedix.)
03-23-2014, 08:32 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#7
RE: Wtf ??? Never srsly never see this :O

I missed an obvious mistake. There's no timer called FadeIn in the script.

void OnStart()
{
FadeOut(0);
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("ActivatePlayer", 3, "WakeUp");
SetLightVisible("BoxLight_1", false);
FadeImageTrailTo(3, 1);
FadeRadialBlurTo(1, 1);
}

Derp.
03-23-2014, 08:58 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#8
RE: Wtf ??? Never srsly never see this :O

No not working but it think i know what is problem

When he spawn black screen and it should gone but it don't when i click tab (Menu) i see some background but when press ESC it's again black so FadeOut it's not good ??? or what ?

03-23-2014, 09:14 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#9
RE: Wtf ??? Never srsly never see this :O

There's nothing that initiates this timer:

if(timer_name == "Start")
{
SetLightVisible("BoxLight_1", true);
FadeIn(4);
AddTimer("MoveHead", 1, "WakeUp");
}

Derp.
03-23-2014, 09:23 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#10
RE: Wtf ??? Never srsly never see this :O

You make me do this Big Grin



hold .hps


Spoiler below!
PHP Code: (Select All)
void OnStart()

{
     
AddUseItemCallback("""Key123""Door123""UseKeyOnDoor"true);
    
AddUseItemCallback("""Study123""Doors122""UseKeyOnDoor2"true);
    
AddEntityCollideCallback("Player""SoundArea""crossarea"true1);
    
SetEntityPlayerInteractCallback("Tomby1""ActivateMonster"true);
    
AddEntityCollideCallback("Player""area1""Open_Door"true1);
    
AddEntityCollideCallback("Player""Look2""LookBack"true1);
    
AddUseItemCallback("""Tomby1""Wooden""UseKeyOnDoor3"true);
    
AddEntityCollideCallback("Player""LightScript""lightsdown"true1);
    
AddEntityCollideCallback("Player""LookDoooor1""LookBack2"true1);
    
SetEntityPlayerInteractCallback("Tower1""ActivateMonster2"true);
    
AddUseItemCallback("""Torture12""Door32""UseKeyOnDoor4"true);
    
AddEntityCollideCallback("Player""Text""Omgtext"true1);    
    
FadeOut(0);
    
FadePlayerRollTo(652020);
    
MovePlayerHeadPos(-1, -0.45, -1.1201);
    
AddTimer("ActivatePlayer"3"WakeUp");
    
SetLightVisible("BoxLight_1"false);
    
FadeImageTrailTo(31);
    
FadeRadialBlurTo(11);
}

void UseKeyOnDoor(string &in asItemstring &in asEntity)
{
        
SetSwingDoorLocked("Door123"falsetrue);
        
PlaySoundAtEntity("""unlock_door""Door123"0false);
        
RemoveItem("Key123");
}

void UseKeyOnDoor2(string &in asItemstring &in asEntity)
{
        
SetSwingDoorLocked("Doors122"falsetrue);
        
PlaySoundAtEntity("""unlock_door.snt""Doors122"0false);
        
RemoveItem("Study123");
}

void ActivateMonster(string &in asEntity)
{
SetEntityActive("Alexander1"true);
AddEnemyPatrolNode("Alexander1""PathNodeArea_1"0"idle");
AddEnemyPatrolNode("Alexander1""PathNodeArea_2"0"idle");
AddEnemyPatrolNode("Alexander1""PathNodeArea_3"0"idle");
    
SetPlayerActive(false);
    
AddTimer(""5.0f"Walkagain");
    
StartPlayerLookAt("Alexander1"5.0f5.0f"");
}

void Open_Door(string &in asParentstring &in asChildint alState)
{
SetSwingDoorClosed("door1"falsetrue);
SetSwingDoorDisableAutoClose("door1"true); // Disable autoclose means its not gonna close by it self.
AddTimer(""0.5"Door_Effect"); // Leading to functions in Door_Effect script.
}

void Door_Effect (string &in asTimer)
{
CreateParticleSystemAtEntity("""ps_dust_whirl""AreaOpenEffect"false); // Makes a patricle system at the scriptbox AreaOpenEffect.
PlaySoundAtEntity("AreaOpenEffect""scare_wind.snt""Player"1true); // Plays a sound at the scriptbox named AreaOpenEffect.
AddPropForce("door1"005000"world"); // Gives the door a push so it goes open.
AddTimer(""0.5"Door_Scare"); // For adding more effect like Sound/Sanity Damage.
}

void Door_Scare(string &in asTimer)
{
PlaySoundAtEntity("scare""react_scare.snt""Player"1true); // For better scare effect.
GiveSanityDamage(25true); // Your screen goes a bit forward to scare you more.
}

void LookBack(string &in asParentstring &in asChildint alState)
{
StartPlayerLookAt("door1"225"CallbackName");
    
SetPlayerActive(false);
    
AddTimer(""3.5f"Walkagain2");
}

void CallbackName()
{
StopPlayerLookAt();
}

void UseKeyOnDoor3(string &in asItemstring &in asEntity)
{
        
SetSwingDoorLocked("Wooden"falsetrue);
        
PlaySoundAtEntity("""unlock_door.snt""Wooden"0false);
        
RemoveItem("Tomby1");
}

void lightsdown(string &in asParentstring &in asChildint alState)
{
SetLampLit("Torch1"falsefalse);
SetLampLit("Torch2"falsefalse);
SetLampLit("Torch3"falsefalse);
SetLampLit("Torch4"falsefalse);
SetLampLit("Torch5"falsefalse);
SetLampLit("Torch6"falsefalse);
}


void LookBack2(string &in asParentstring &in asChildint alState)
{
StartPlayerLookAt("Mansion11"225"CallbackName");
}

void ActivateMonster2(string &in asEntity)
{
SetEntityActive("Creepy1"true);
AddEnemyPatrolNode("Creepy1""PathNodeArea_4"0"idle");
}

void UseKeyOnDoor4(string &in asItemstring &in asEntity)
{
        
SetSwingDoorLocked("Door32"falsetrue);
        
PlaySoundAtEntity("""unlock_door.snt""Door32"0false);
        
RemoveItem("Torture12");
}

void Walkagain(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
}

void Walkagain2(string &in asTimer)
{
SetPlayerActive(true);
}

void WakeUp(string &in timer_name)
{
if(
timer_name == "Start")
{
SetLightVisible("BoxLight_1"true);
FadeIn(4);
AddTimer("MoveHead"1"WakeUp");
}

else if (
timer_name == "MoveHead")
{
FadeImageTrailTo(01);
FadeRadialBlurTo(11);
MovePlayerHeadPos(-0.5, -0.2, -1.122);
FadePlayerRollTo(01.7500);
AddTimer("ActivatePlayer"2"WakeUp");
}

else if (
timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(00022);
SetPlayerActive(true);
}



Edit:
WHAT IS PROBLEM ?????????????????????????????????????????????????????????????????????????

(This post was last modified: 05-15-2014, 03:31 PM by Straxedix.)
03-23-2014, 09:24 PM
Find




Users browsing this thread: 4 Guest(s)