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
I need some Help. HARDCORE SCRIPT :P
Author Message
Tanshaydar Offline
From Beyond

Posts: 3,091
Joined: Mar 2009
Reputation: 66
Post: #11
RE: I need some Help. HARDCORE SCRIPT :P
AddTimer("scare", 0.3f, "TimerPlayerReact");
AddTimer("breath", 2.0f, "TimerPlayerReact");
AddTimer("breathl", 4.0f, "TimerPlayerReact");
AddTimer("breathl", 6.0f, "TimerPlayerReact");

AddTimer("TeleportHowl", 0.5f, "TimerTeleportHowl");
AddTimer("TeleportDone", 3.5f, "TimerTelportDone");

If you don't want player to teleport, just go to TimerTeleportHowl or TimerTelportDone function, which one has the TeleportPlayer function, end remove it. That's it.

07-19-2011 03:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #12
RE: I need some Help. HARDCORE SCRIPT :P
oh ok

Add this instead then:
void OnStart()
{
AddEntityCollideCallback("Player", "scriptname", "functionname", true, 1);
}

void functionname(string &in asParent, string &in asChild, int alState)
{
FadeOut(0);
AddTimer("", 1.5, "TimerName");
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0.5f, false);
SetPlayerCrouching(true);
}

void TimerName(string &in asTimer)
{
TeleportPlayer("StartPosName");
AddTimer("", 0.0f, "TimerName2");
FadeIn(1.0f);
}

void TimerName2(string &in asTimer)
{
FadeRadialBlurTo(15.0f, 0.5f);
StartScreenShake(0.3f, 0.5f, 0.5f, 0.5f);
AddTimer("", 1.6f, "TimerName3");
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "insanity_imageflash01.snt", "Player", 0.5f, false);
PlaySoundAtEntity("", "water_lurker_hunt.snt", "Player", 0.5f, false);
}

void TimerName3(string &in asTimer)
{
StartScreenShake(0.0f, 0.0f, 0.0f, 0.0f);
FadeRadialBlurTo(0.0f, 0.5f);
SetPlayerCrouching(false);
}


EDIT: You can change the durration of the screen effects by changing the AddTimer("", 1.6f, "TimerName3"); To how many secs you want the screen effects to last.

[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 07-19-2011 03:15 AM by xtron.)
07-19-2011 03:11 AM
Find all posts by this user Quote this message in a reply
Angerpull Offline
Member

Posts: 88
Joined: Jun 2011
Reputation: 0
Post: #13
RE: I need some Help. HARDCORE SCRIPT :P
(07-19-2011 03:11 AM)xtron Wrote:  oh ok

Add this instead then:
void OnStart()
{
AddEntityCollideCallback("Player", "scriptname", "functionname", true, 1);
}

void functionname(string &in asParent, string &in asChild, int alState)
{
FadeOut(0);
AddTimer("", 1.5, "TimerName");
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0.5f, false);
SetPlayerCrouching(true);
}

void TimerName(string &in asTimer)
{
TeleportPlayer("StartPosName");
AddTimer("", 0.0f, "TimerName2");
FadeIn(1.0f);
}

void TimerName2(string &in asTimer)
{
FadeRadialBlurTo(15.0f, 0.5f);
StartScreenShake(0.3f, 0.5f, 0.5f, 0.5f);
AddTimer("", 1.6f, "TimerName3");
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "insanity_imageflash01.snt", "Player", 0.5f, false);
PlaySoundAtEntity("", "water_lurker_hunt.snt", "Player", 0.5f, false);
}

void TimerName3(string &in asTimer)
{
StartScreenShake(0.0f, 0.0f, 0.0f, 0.0f);
FadeRadialBlurTo(0.0f, 0.5f);
SetPlayerCrouching(false);
}


EDIT: You can change the durration of the screen effects by changing the AddTimer("", 1.6f, "TimerName3"); To how many secs you want the screen effects to last.

Thank you! But it's still not the way I want it... It does the effects and all but not the beginning. like the BOOM and then shit hits the fan, it just Instantly turns black without any BOOM sound.

Any fix?
07-19-2011 03:32 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #14
RE: I need some Help. HARDCORE SCRIPT :P
To let everyone know how useful timers in one function is, for the one's who don't know, that it'll save you a lot of time and length. http://wiki.frictionalgames.com/hpl2/tut...ncedtimers

07-19-2011 03:33 AM
Find all posts by this user Quote this message in a reply
Kurton Offline
Senior Member

Posts: 268
Joined: Oct 2010
Reputation: 5
Post: #15
RE: I need some Help. HARDCORE SCRIPT :P
You could certainly peruse your sounds folder for a suitable BOOM sound, then add another PlaySoundAtEntity for it.

07-19-2011 03:50 AM
Find all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #16
RE: I need some Help. HARDCORE SCRIPT :P
yea just add another
PlaySoundAtEntity("", "sound_file.snt", "Player", 0.5f, false);

and replace sound_file.snt with a BOOM sound.


btw: add it under "functionname"

[Image: 44917299.jpg]Dubstep <3
07-19-2011 04:27 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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