Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paper Blow [solved]
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#4
RE: Paper Blow

The area on the floor should be called "AreaBlow".
Wait I'll put comments to describe into the script.^^

void OnStart()
{
    AddEntityCollideCallback("Player", "AreaActivate", "CollideAreaActivate", true, 1); //Player = who has to be in the area, can also be an object or enemy. AreaActivate(has to be the same name as in leveleditor) is which area Player has to be in to activate the script called CollideAreaActivate.
}

void CollideAreaActivate(string &in asParent, string &in asChild, int alState)
{
        AddTimer("blowpaper", 1.0f, "TimerPaperBlow"); //blowpaper is just a random name, you can name it asdf as well. 1.0f is the amount of time till TimerPaperBlow gets activated.
        PlaySoundAtEntity("windsound", "scare_wind_reverse", "AreaBlow", 1.0f, false); //Windsound is also a random name, scare_wind_reverse is the name of the soundfile, AreaBlow is where the sound is played, 1.0f is the fade time and false declares that it wont repeat.
}

void TimerPaperBlow(string &in asTimer)
{
        CreateParticleSystemAtEntity("paper", "ps_paper_blow.ps", "AreaBlow", false); //paper = random name, ps_paper_blow.ps is the name of the particlesystem, AreaBlow is where it gets created.
}

[Image: 18694.png]
(This post was last modified: 07-29-2011, 09:42 PM by Ongka.)
07-29-2011, 09:08 PM
Find


Messages In This Thread
Paper Blow [solved] - by clock123 - 07-29-2011, 07:48 PM
RE: Paper Blow - by Ongka - 07-29-2011, 08:20 PM
RE: Paper Blow - by clock123 - 07-29-2011, 09:01 PM
RE: Paper Blow - by Ongka - 07-29-2011, 09:08 PM
RE: Paper Blow - by clock123 - 07-29-2011, 09:47 PM
RE: Paper Blow - by Ongka - 07-29-2011, 09:48 PM
RE: Paper Blow - by clock123 - 07-29-2011, 10:14 PM



Users browsing this thread: 1 Guest(s)