First off i'm new to expression 2 so if theres something wrong could you please explain it throughly.
I'm wondering why this code works fine.
Code:
@name Rave Break
@inputs Num Em1:entity Em2:entity Em3:entity Em4:entity P1:entity
@outputs Go
if (Num == 1){
Em1:soundPlay(1,0,"custom/RAVEBREAK.mp3")
Em2:soundPlay(2,0,"custom/RAVEBREAK.mp3")
Em3:soundPlay(3,0,"custom/RAVEBREAK.mp3")
Em4:soundPlay(4,0,"custom/RAVEBREAK.mp3")
Go = 1
}
else{
soundPurge()
Go = 0
} Yet this code starts to play the song but keeps stuttering like its trying to play the song but restarting from the beginning.
Code:
@name CD Player Play
@inputs R Sp1:entity Sp2:entity
@outputs Go
if (R == 254){
Go = 1
Sp1:soundPlay(1,0,"custom/broll.mp3")
}
else{
Go = 0
soundPurge()
} Any help is appreciated.
EDIT: So i restarted my game and replaced the chip and other things and got it to work but i now want to add other colors in but i'm not sure how i would add the other lines I don't think this is correct but if you could give suggestions
Code:
@name CD Player Play
@inputs R G Sp1:entity Sp2:entity
@outputs Go
if (R == 254){
Go = 1
Sp1:soundPlay(1,0,"custom/broll.mp3")
}
else{
Go = 0
soundPurge()
}
if (G == 254){
Go = 1
Sp1:soundPlay(1,0,"custom/ravebreak.mp3")
}
else{
soundPurge()
}
Bookmarks