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 Help PlayerInteractCallback how to let it trigger once.
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#1
PlayerInteractCallback how to let it trigger once.

Well i made a nice event and i want that you only can click once or it or if you click it for the second time only a text appears like 'i better not touch it again' but how does that work?

Current script now
Spoiler below!

void SecretEvent2(string &in asEntity)
{
PlaySoundAtEntity("scare", "react_scare.snt", "Player", 1, true);
GiveSanityDamage(10, true);
AddTimer("", 1.0, "SecretEvent_Scare2");
SetPlayerLookSpeedMul(0.1);
SetPlayerRunSpeedMul(0.1);
}

void SecretEvent_Scare2(string &in asTimer)
{
GivePlayerDamage(20.0f, "BloodSplat", false, false);
AddTimer("", 2.0, "SecretEvent_Fade2");
FadePlayerRollTo(90, 1, 7);
MovePlayerHeadPos(0.25f, -0.3f, 0, 1, 0.5f);
GiveSanityDamage(100, true);
StartPlayerLookAt("GraveyardMonster", 4.0f, 4.0f, "");
SetEntityActive("GraveyardMonster", true);
ShowEnemyPlayerPosition("GraveyardMonster");
}

void SecretEvent_Fade2(string &in asTimer)
{
SetPlayerCrouching(true);
FadeOut(3);
AddTimer("", 4.0, "SecretEvent_ChangeMap2");
SetMessage("Messages", "SecretEvent3", 3.5);
StopPlayerLookAt();
}

void SecretEvent_ChangeMap2(string &in asTimer)
{
FadePlayerRollTo(0, 15, 90);
TeleportPlayer("BackFromGraveyard");
FadeIn(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
PlayMusic("18_amb.ogg", true, 1, 1, 1, true);
AddTimer("", 4.0, "SecretEvent_TextReturn");
}

void SecretEvent_TextReturn(string &in asTimer)

{
SetMessage("Messages", "SecretEvent4", 5.0);
}


Already Thanks for helping Big Grin

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
(This post was last modified: 03-23-2013, 01:31 PM by VeNoMzTeamHysterical.)
03-22-2013, 10:36 PM
Website Find
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#2
RE: Need help on a nice script!

Check out the wiki.
http://wiki.frictionalgames.com/hpl2/amn..._functions

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
03-22-2013, 10:37 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#3
RE: Need help on a nice script!

(03-22-2013, 10:37 PM)Wapez Wrote: Check out the wiki.
http://wiki.frictionalgames.com/hpl2/amn..._functions

Im already doing that haha its getting better Smile

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
03-22-2013, 10:52 PM
Website Find




Users browsing this thread: 1 Guest(s)