PDA

View Full Version : Joe's TriggerSFX Problem



Sephiroth
04-23-2010, 08:48 AM
Cross-posted from PZC

Ok, I am using build 1228, and I've loaded Joe's trigger SFX script into my quest file.



ffc script TriggerSFX{
void run(int sfx){
int loc = ComboAt(this->X,this->Y);
int orig = Screen->D[loc];
while(Screen->ComboD[loc] == orig) Waitframe();
Game->PlaySound(sfx);
}
}

Now my problem is, whenever I enter the screen the FFC script is on, no matter whether or not the trigger has been triggered, (In this case I'm using a step trigger permanent to open a door) the sound effect plays. No matter what the screen state is, the sound effect plays.

Is there some sort of fix for 1228?

Joe123
04-23-2010, 04:14 PM
Try putting 'Waitframes(2);' at the start of run()

Sephiroth
04-23-2010, 09:26 PM
A fix that works perfectly was posted for me on Pure. Thanks again.