Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stop music
Author Message
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
Tanshaydar Offline
From Beyond

Posts: 3,091
Joined: Mar 2009
Reputation: 66
Post: #12
RE: Stop music
Is this all your hps file?
What is it that doesn't work?

06-06-2011 01:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
Greven Offline
Member

Posts: 106
Joined: May 2011
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #15
RE: Stop music
Doesn't work Confused

[Image: 44917299.jpg]Dubstep <3
06-06-2011 02:22 PM
Find all posts by this user Quote this message in a reply
Khyrpa Offline
Senior Member

Posts: 615
Joined: Apr 2011
Reputation: 24
Post: #16
RE: Stop music
Are you sure piano can actually be destroyed?
06-06-2011 02:37 PM
Find all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)