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
An annoying script problem.
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#1
An annoying script problem.

Hey everyone,

I'm working on a script file to my map, the problem is I want to make a script that if player tries to open the locked door, he hears ghostly sounds and gets an instant sanity damage, but for some reason this doesn't work. The function also adds a timer which is 7 second, and after it, the door should open, but it does not as well. I added debug messages and they do not show up in-game. Anyone knows the solution?

The "not-working" part of my .hps file

PHP Code: (Select All)
void Func_StartMadness(string &in entity)
{
    if(
GetSwingDoorLocked("hub_1") == true)
    {
        
AddDebugMessage("Feel the wrath of Shao Kahn!"false);
        
AddTimer("TriggerOpenDoor"7.0f"TriggerOpenDoorFunc"); 
        
SetMessage("Messages""drzwi2"0);
        
GiveSanityDamage(10.0f,true);
        
PlaySoundAtEntity("Ghostly_Sounds""00_cuts_3d""Ghostly_SoundsArea"0false);
    }
}

void TriggerOpenDoorFunc(string &in asTimer)
{
    
AddDebugMessage("Feel the power of Shao Kahn!"false);
    
ChangePlayerStateToNormal();
    
SetPlayerActive(true);
    
SetSwingDoorLocked("hub_1"falsetrue);
    
PlaySoundAtEntity("""unlock_door.snt""hub_1"0.0ftrue);
    
SetPlayerCrouching(false);
    
FadeImageTrailTo(0,1);


ofc the door names in the notepad and level editor are the same. Any help will be appreciated.

EDIT: nvmd, I fixed it. This thread may be closed now.
(This post was last modified: 04-02-2014, 07:53 PM by Slanderous.)
04-02-2014, 07:32 PM
Find


Messages In This Thread
An annoying script problem. - by Slanderous - 04-02-2014, 07:32 PM
RE: An annoying script problem. - by Wapez - 04-02-2014, 07:51 PM
RE: An annoying script problem. - by Slanderous - 04-02-2014, 07:54 PM



Users browsing this thread: 1 Guest(s)