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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help me with scripts
Khan Offline
Member

Posts: 61
Threads: 12
Joined: Aug 2011
Reputation: 0
#7
RE: Help me with scripts

Remember, you know wat is all going to happen, so heres a pro tip. If you get creeped out by your own story, then you're doing good. Smile To help you out, and explaine some of the script functions. AddEntityCollideCallBack Is wat you are going to use for your script area, So lets say you want a door to slam shut, you would use this.

Void OnStart()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorslam", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(9.0f, true);
}

As you can see, you use collide back to work your scary parts, dont forget to name your void functions to, if both the same functions have the same names void func it will not work. I hope this helped you understand scripting, and maybe gave you a free door slam :p
Tricks and Tips to making one, dont give up, and be afraid to take your time, if it does not look good to you, it may not look good to others, I myself am a perfectionist, I cannont and will not release a custom story if I dont think its perfect, just go with the flow and do wat you think is good scary and looks good.
(This post was last modified: 08-20-2011, 06:46 PM by Khan.)
08-20-2011, 06:42 PM
Find


Messages In This Thread
Help me with scripts - by fuytko - 08-19-2011, 02:07 PM
RE: Help me with scripts - by xtron - 08-19-2011, 02:10 PM
RE: Help me with scripts - by Elven - 08-19-2011, 02:58 PM
RE: Help me with scripts - by JetlinerX - 08-20-2011, 03:47 PM
RE: Help me with scripts - by darkside - 08-20-2011, 03:55 PM
RE: Help me with scripts - by Phoroneus - 08-21-2011, 04:46 AM
RE: Help me with scripts - by JetlinerX - 08-20-2011, 03:57 PM
RE: Help me with scripts - by Khan - 08-20-2011, 06:42 PM
RE: Help me with scripts - by xtron - 08-20-2011, 07:31 PM
RE: Help me with scripts - by fuytko - 08-20-2011, 09:34 PM
RE: Help me with scripts - by JetlinerX - 08-21-2011, 12:06 AM
RE: Help me with scripts - by fuytko - 08-21-2011, 01:02 AM
RE: Help me with scripts - by JetlinerX - 08-21-2011, 01:08 AM
RE: Help me with scripts - by JetlinerX - 08-21-2011, 08:03 AM



Users browsing this thread: 1 Guest(s)