+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Paper Blow [solved] (/thread-9479.html)
Wait.... What I have to write in what?, Here's the things I did in pictures, and the script.:
The pictures : http://imageshack.us/g/11/bhhghg.png/
The script:
I know I need to put the script in the hps file, but I just dont know what to do with what, I mean, what name's to input in what, etc'. if someone can just help me about this I will thank him
The area on the floor should be called "AreaBlow".
Wait I'll put comments to describe into the script.^^
Code:
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.
}
It wont work for me, Perphaps I named something wrong?, It can't be, everything is the same name but I changed what you told me to, the script at the floor to "Areablow"
You maybe know why it wont work?