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
Script Help Need help debugging various script functions
Silent Darkness Offline
Junior Member

Posts: 37
Threads: 9
Joined: Jul 2012
Reputation: 0
#28
RE: Need help debugging various script functions

I followed the directions carefully, but when I try to view it rendered, the screen shows up blank. No mesh at all.

Nevermind, I think i got it. Alright, maybe i'll finally have this problem out of the way in a day or two.

Hahah, I got it!


Also, your script for the inventory.hps sounds right, but it isn't working for some reason. Maybe I screwed it up somehow. Trying to combine the items just throws the boilerplate "Combination does not work!" response. SyringePlayer is the player-representing item, Speedremedy is the syringe item.
void OnGameStart()
{
AddCombineCallback("InjectSpeedRemedy","SyringePlayer","SpeedRemedy","StartSyringePowers",false);
}

void StartSyringePowers(string &in SyringePlayer, string &in SpeedRemedy)
{
RemoveItem("SyringePlayer");
RemoveItem("SpeedRemedy");
ExitInventory();
GivePlayerDamage(3,"BloodSplat",false,true);
GiveSanityDamage(40,true);
SetPlayerMoveSpeedMul(1.8);
SetPlayerRunSpeedMul(1.5);
SetPlayerLookSpeedMul(2.0);
AddTimer("heartbeat_sound", 0, "heartbeat_sound");
  AddTimer("finishTimer", 10, "finishTimer");
}

void heartbeat_sound(string &in asTimer)
{
        PlaySoundAtEntity("heart", "Heartbeat_fast.snt", "Player", 0, true);
        AddTimer("heartbeat_sound", 8, "heartbeat_sound"); //loop sound
}
    
void finishTimer(string &in asTimer)
{
        SetPlayerMoveSpeedMul(1); // change players speed to normal
        SetPlayerRunSpeedMul(1);// change players speed to normal
        StopSound("heart", 1); // stop sound if it is still playing
        RemoveTimer("heartbeat_sound");
}

Edit: Nevermind, I managed to fix it. Alright, i'm going to update the code in the first post. By the way, I want to create an effect similar to the visual effect the monster roar insanity events cause: The screen tinting bright red. FadeSepiaColorTo doesn't quite seem to have what i'm looking for. Any ideas?
(This post was last modified: 09-16-2013, 11:47 PM by Silent Darkness.)
09-16-2013, 06:45 PM
Find


Messages In This Thread
RE: Need help debugging various script functions - by Silent Darkness - 09-16-2013, 06:45 PM



Users browsing this thread: 1 Guest(s)