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
Shake Function
Carlos2295 Offline
Junior Member

Posts: 16
Threads: 5
Joined: Sep 2014
Reputation: 0
#1
Shake Function

Hi there, I was working on a custom story and I was wondering how I would make the screen shake, sort of like when the shadow roars. I used the wiki and made this code, however, it doesn't work when run. Any suggestions would be really appreciated. Here's what I've got so far:

PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("OpenDoor""librarykey""level_wood_3""UnlockLevelDoor"true);
    
AddEntityCollideCallback("Player""PlayerCollide""ShakeFunction"true1); 
}
void OnEnter()
{
    
PlayMusic("02_amb_safe.ogg"true0.91.01true);
}
void OnLeave()
{
    
StopMusic(1);
}
void UnlockLevelDoor(string &in itemstring &in entity)
{
    
SetLevelDoorLocked(entityfalse);
    
AddPlayerSanity(100);
    
RemoveItem("librarykey");
    
CompleteQuest("""LibraryDoorQuest");
}
void memento(string &in asEntity)
{
    
AddQuest("""LibraryDoorQuest");
}
void ShakeFunction()
{
    
StartScreenShake(1,2,1,4);

(This post was last modified: 09-23-2014, 05:33 AM by Carlos2295.)
09-23-2014, 05:33 AM
Website Find


Messages In This Thread
Shake Function - by Carlos2295 - 09-23-2014, 05:33 AM
RE: Shake Function - by FlawlessHappiness - 09-23-2014, 07:06 AM
RE: Shake Function - by Mudbill - 09-23-2014, 07:07 AM
RE: Shake Function - by FlawlessHappiness - 09-23-2014, 07:44 AM
RE: Shake Function - by Mudbill - 09-23-2014, 08:00 AM



Users browsing this thread: 1 Guest(s)