Here is GML version of what I want:
if (sound_isplaying(sound3)) { if (instance_exists(Bat)) { Bat.hp -= 1; } }
How do I properly do ZScript version of what I want please?
Posted 12 September 2016 - 09:34 PM
if (sound_isplaying(sound3)) { if (instance_exists(Bat)) { Bat.hp -= 1; } }
Posted 12 September 2016 - 09:48 PM
Posted 12 September 2016 - 11:23 PM
I think playing a sound is write-only, meaning you can have a script tell the game to play a sound…the script is: Game->PlaySound(3). However, I don't think an if statement would work properly, that is: if(Game->PlaySound(3)){
HOWEVER, you could script an event to play sound 3 and then simultaneously if whenever that event is triggered, it also triggers the HP reduction.
Posted 13 September 2016 - 09:59 PM
Edited by ZoriaRPG, 14 September 2016 - 04:23 AM.
Posted 13 September 2016 - 10:20 PM
Out of curiosity, I checked std_constants.zh and found that SFX #3 is a bomb blast. If you're not using a script to play that sound, perhaps you could more easily check to see if there's a bomb blast or super bomb blast on screen?
Posted 15 September 2016 - 01:32 PM
Out of curiosity, I checked std_constants.zh and found that SFX #3 is a bomb blast. If you're not using a script to play that sound, perhaps you could more easily check to see if there's a bomb blast or super bomb blast on screen?
0 members, 0 guests, 0 anonymous users