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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Scares
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#1
Random Scares

Hello everyone! I've used this technique in my custom story, A Forgotten Memory. Special thanks for people that helped me to understand this. Using this will randomize the scares you will have. This gives the CS/FC replay value.

It's like this, each playthrough had different results. Example;
First Playthrough : You pass out and wakes up in some other place.
Second Playthrough : A door blew open.

It's good. Why? Because the Player will think like he knew, but he didn't.

Okay, enough with the chattering. Let's start.

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""ScriptArea_1""PlrCollideSwitch"true1);
}

void PlrCollideSwitch(string &in asParentstring &in asChildint alState)
{
int x RandInt(15);
switch(
x)
{
case 
1:
//Scare 1
    
break;
case 
2:
//Scare 2
    
break;
case 
3:
//Scare 3
    
break;
case 
4:
//Scare 4
    
break;
case 
5:
//Scare 5
    
break;
}

Get it? Integer is RandInt, and it will randomize between 1 and 5 as 1 is the minimal and 5 is the maximal. If one of the cases fit with the inputInteger, it will do that case until the first break is reached. For this, you don't need curly brackets({}) to envelope code, but you need breaks.
Just change the
//Scare #CaseNumber
to what scare you want.

Even nobody including you (the creator) will know which one is picked.
This will give your custom story/full conversion replay value.

OFF-TOPIC:
Even Scares are now can be randomized. I'm so smart.

EDIT:
It seems like the script gives everyone an error. I already changed it and now tell me if it works or not.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 05-17-2013, 12:26 PM by PutraenusAlivius.)
04-16-2013, 03:10 PM
Find


Messages In This Thread
Random Scares - by PutraenusAlivius - 04-16-2013, 03:10 PM
RE: Random Scares - by Yare - 04-16-2013, 03:39 PM
RE: Random Scares - by PutraenusAlivius - 04-17-2013, 06:10 AM
RE: Random Scares - by Yare - 04-17-2013, 12:44 PM
RE: Random Scares - by PutraenusAlivius - 04-17-2013, 12:51 PM
RE: Random Scares - by Yare - 04-17-2013, 01:55 PM
RE: Random Scares - by VeNoMzTeamHysterical - 04-17-2013, 02:04 PM
RE: Random Scares - by FlawlessHappiness - 04-18-2013, 11:11 AM
RE: Random Scares - by PutraenusAlivius - 04-18-2013, 11:58 AM
RE: Random Scares - by Your Computer - 04-18-2013, 12:10 PM
RE: Random Scares - by Adrianis - 04-18-2013, 12:40 PM
RE: Random Scares - by Your Computer - 04-18-2013, 01:00 PM
RE: Random Scares - by CarnivorousJelly - 04-19-2013, 05:57 AM
RE: Random Scares - by Adrianis - 04-19-2013, 09:45 AM
RE: Random Scares - by Adrianis - 04-18-2013, 01:11 PM
RE: Random Scares - by FlawlessHappiness - 04-20-2013, 09:42 AM
RE: Random Scares - by Adrianis - 04-20-2013, 08:23 PM
RE: Random Scares - by FlawlessHappiness - 04-23-2013, 06:48 PM
RE: Random Scares - by PutraenusAlivius - 04-24-2013, 08:24 AM
RE: Random Scares - by Adrianis - 04-24-2013, 04:56 PM
RE: Random Scares - by RurouniMori - 05-07-2013, 04:22 AM
RE: Random Scares - by PutraenusAlivius - 05-17-2013, 12:19 PM
RE: Random Scares - by FlawlessHappiness - 04-24-2013, 04:50 PM
RE: Random Scares - by PutraenusAlivius - 05-07-2013, 04:30 AM
RE: Random Scares - by RurouniMori - 05-07-2013, 04:47 AM
RE: Random Scares - by Adrianis - 05-20-2013, 06:49 PM
RE: Random Scares - by PutraenusAlivius - 05-21-2013, 02:19 AM
RE: Random Scares - by GoreGrinder99 - 07-21-2013, 11:22 AM
RE: Random Scares - by PutraenusAlivius - 07-21-2013, 11:30 AM
RE: Random Scares - by GoreGrinder99 - 07-21-2013, 11:50 AM
RE: Random Scares - by PutraenusAlivius - 07-21-2013, 12:27 PM



Users browsing this thread: 1 Guest(s)