The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Areas
ZRPT Offline
Junior Member

Posts: 17
Threads: 3
Joined: Aug 2011
Reputation: 1
#1
Script Areas

I was wondering what type of script would be used to only activate a features when entering an area in a certain direction. An example would be in the custom story "The Attic" the scene where you get knocked down the stairs. Going up the stairs there are no effects, however when going back down you get pushed and thrown all the way down. After looking at the scrip the author has made I have concluded that this was the script he used.
void Scare(string &in asParent, string &in asChild, int alState)
{
        SetEntityActive("levelchangefade", true);
        SetSwingDoorLocked("mansion_8", false, true);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor1", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor1", false);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor2", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor2", false);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor3", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor3", false);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor4", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor4", false);
        PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
        GiveSanityDamage(20, true);
        AddPlayerBodyForce(-40000, 25000, 0, false);
        FadePlayerRollTo(75, 3, 2);
        StartPlayerLookAt("mansion_8", 2, 2, "");
        SetPlayerCrouching(true);
        AddTimer("", 2, "Timer1");
        AddTimer("", 10, "Timer2");
        GivePlayerDamage(10, "BloodSplat", false, false);
        PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
        FadeRadialBlurTo(1, 0.5);
}
//--------------------------------------------------------------------------------//
void Timer1(string &in asTimer)
{
        StartPlayerLookAt("mansion_8", 0.4, 0.4, "");
        FadePlayerRollTo(-75, 3, 2);
        AddTimer("", 2, "Timer3");
        PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
}
//--------------------------------------------------------------------------------//
void Timer3(string &in asTimer)
{
        PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
        StartPlayerLookAt("mansion_8", 0.4, 0.4, "");
        FadePlayerRollTo(0, 0, 0);
        AddTimer("", 2, "Timer5");
        FadeRadialBlurTo(0, 1);
}
//--------------------------------------------------------------------------------//
void Timer5(string &in asTimer)
{
        PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
//--------------------------------------------------------------------------------//
void Timer2(string &in asTimer)
{
        SetPlayerCrouching(false);
        StopPlayerLookAt();
}

I can't really explain it but if you watch this video and skip to 10:33 and watch until 12:50, you should get an understanding of what I mean

08-28-2011, 07:28 AM
Find


Messages In This Thread
Script Areas - by ZRPT - 08-28-2011, 07:28 AM
RE: Script Areas - by GreyFox - 08-28-2011, 07:55 AM
RE: Script Areas - by ZRPT - 08-28-2011, 08:04 AM
RE: Script Areas - by Obliviator27 - 08-28-2011, 08:12 AM
RE: Script Areas - by ZRPT - 08-28-2011, 08:27 AM
RE: Script Areas - by MegaScience - 08-28-2011, 01:11 PM
RE: Script Areas - by JenniferOrange - 08-28-2011, 02:04 PM
RE: Script Areas - by MegaScience - 08-28-2011, 02:18 PM
RE: Script Areas - by JenniferOrange - 08-28-2011, 02:31 PM
RE: Script Areas - by MegaScience - 08-28-2011, 03:06 PM
RE: Script Areas - by JetlinerX - 08-28-2011, 04:51 PM
RE: Script Areas - by MegaScience - 08-28-2011, 05:26 PM
RE: Script Areas - by JetlinerX - 08-28-2011, 06:10 PM
RE: Script Areas - by MegaScience - 08-28-2011, 06:12 PM
RE: Script Areas - by ZRPT - 08-29-2011, 03:08 PM



Users browsing this thread: 4 Guest(s)