View Single Post
jjturbo9

JCF Member

Joined: Mar 2025

Posts: 7

jjturbo9 has disabled reputation

Mar 24, 2025, 12:09 PM
jjturbo9 is offline
Reply With Quote
Thank you a lot!! I will try this code now. I wonder why you have to write player.xPos and player.yPos though. Seems irrelevant to me, what am I missing?

I just tried it but I don't hear the sound yet. To be extra clear about what I try:
When Jazz (or another) walks through the event 'Trigger Zone 21 | onoff 1 | switch 0' the sound COMMON_ITEMTRE has to be played. But only the first time he walks through it, I don't want the sound to trigger every time, only when the thing is triggered the first time. But I think that would be the case automatically anyways?

I just copy/pasted the first code you send in my AS file where the other AS code already worked. And replaced 66 for 21, but when I trigger the thing I don't hear anything. I already checked if I wrote COMMON_ITEMTRE correctly and that's not the issue...

code I use now:

void onFunction0(jjPLAYER@ player) {
if (!jjTriggers[21]) {
jjTriggers[21] = true;
jjSample(player.xPos, player.yPos, SOUND::COMMON_ITEMTRE);
}
}

I'm curious what the issue is but I have no idea tbh.