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
Stop music
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#11
RE: Stop music

so what should I use for this code:
void func_piano1_disapear(string &in asParent, string &in asChild, int alState)
{
StopMusic( 0, 1);
StartPlayerLookAt("piano1", 10, 50, "");
AddTimer("", 0.5f, "TimerDestroyPiano1");
}

void TimerDestroyPiano1(string &in asTimer)
{
SetPropHealth("piano1", -100);
PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
GiveSanityDamage(4.0f, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
AddTimer("", 1.0f, "TimerStopLook1");
}

void TimerStopLook1(string &in asTimer)
{
StopPlayerLookAt();
}



[Image: 44917299.jpg]Dubstep <3
06-06-2011, 01:07 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#12
RE: Stop music

Is this all your hps file?
What is it that doesn't work?

06-06-2011, 01:12 PM
Website Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#13
RE: Stop music

It's just a function.

I'm trying to fix so when the player enters a specific area the piano destorys "SetPropHealth("piano1", -100);". Everything is working except the "setprophealth" function.

[Image: 44917299.jpg]Dubstep <3
06-06-2011, 01:16 PM
Find
Greven Offline
Member

Posts: 106
Threads: 13
Joined: May 2011
Reputation: 3
#14
RE: Stop music

When it says set prop health you should write like this:
SetPropHealth("piano1", 0); Its like a health bar, you set its current hp.
So now if its 0 it means the prop has 0 health and is destroyed completely.

[WIP] Recidivus
(This post was last modified: 06-06-2011, 01:55 PM by Greven.)
06-06-2011, 01:54 PM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#15
RE: Stop music

Doesn't work :S

[Image: 44917299.jpg]Dubstep <3
06-06-2011, 02:22 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#16
RE: Stop music

Are you sure piano can actually be destroyed?
06-06-2011, 02:37 PM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#17
RE: Stop music

Nevermind...I erased the script ^^. Don't need it.

Thanks for the help btw Tongue

[Image: 44917299.jpg]Dubstep <3
06-06-2011, 02:45 PM
Find




Users browsing this thread: 3 Guest(s)