Damascus
Senior Member
Posts: 646
Threads: 118
Joined: Mar 2012
Reputation:
29
CreateParticleSystem not working
I've created a ScriptArea that i want to produce a whirl of dust. When the player completes a puzzle, they hear a roar in the distance, and a whirl of dust blows out the nearby torches. I've called the ScriptArea "WhirlArea," and here's the script I have set up:
Spoiler below!
(at the end of the function that solves the puzzle)
AddTimer("groan", 5, "Timer_Machine1");
AddTimer("whirl", 5.5, "Timer_Machine1");
AddTimer("lightsout", 6, "Timer_Machine1");
void Timer_Machine1(string &in asTimer)
{
if(asTimer == "groan")
{
PlaySoundAtEntity("", "11_guardian_idle", "GroanArea", 2.0f, false);
}
else if(asTimer == "whirl")
{
CreateParticleSystemAtEntity("", "ps_dust_whirl", "AreaWhirl", false);
}
else if(asTimer == "lightsout")
{
SetLampLit("torch_static01_29", false, true);
SetLampLit("torch_static01_30", false, true);
FadeLightTo("PointLight_14", 0, 0, 0, 0, 0, 1);
}
}
The sound plays, and the lights go out, but there is no whirl of dust. Any reason why this might be happening?
(This post was last modified: 03-16-2012, 09:46 AM by Damascus .)
03-16-2012, 08:59 AM
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
RE: CreateParticleSystem not working
trying putting .ps in CreateParticleSystemAtEntity, i.e
CreateParticleSystemAtEntity("", "ps_dust_whirl", "AreaWhirl", false);
You're missing the .ps there, try putting "ps_dust_whirl.ps" .
03-16-2012, 09:03 AM
Damascus
Senior Member
Posts: 646
Threads: 118
Joined: Mar 2012
Reputation:
29
RE: CreateParticleSystem not working
Made the change, but the particle system still won't appear.
03-16-2012, 09:21 AM
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
RE: CreateParticleSystem not working
Very odd.. I just did some testing on my map with that. It seems to appear fine for me. Here's the code:
void OnStart() {
AddTimer("", 5.0f, "Whirl");
}
void Whirl(string &in asTimer) {
AddDebugMessage("WHIRL", false);
CreateParticleSystemAtEntity("", "ps_dust_whirl.ps", "AreaWhirl", false);
}
Try adjusting the position of the area you are creating the particle at also.
03-16-2012, 09:43 AM
Damascus
Senior Member
Posts: 646
Threads: 118
Joined: Mar 2012
Reputation:
29
RE: CreateParticleSystem not working
(03-16-2012, 08:59 AM) Damascus Wrote: I've called the ScriptArea "WhirlArea ," and here's the script I have set up:
CreateParticleSystemAtEntity("", "ps_dust_whirl", "AreaWhirl ", false);How is it i can spend hours going over the script before posting, and then only notice what I did wrong five minutes after I post?
03-16-2012, 09:45 AM
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
RE: CreateParticleSystem not working
It happens!
Can't believe I didn't notice that either x.x
(This post was last modified: 03-16-2012, 09:49 AM by Equil .)
03-16-2012, 09:48 AM