I am now doing some actions for my game character for a ‘finish move’ after her dance. And i want a function that:
- loads a sound track
- when its loaded, it will play itself and the ‘happy yeeying action’ of my game character
The sound should be only played once. ( the script is connected to an Always with no pulse enabled )
The script now just makes the girl doing her yeeying action.
I made something like this but it doesnt really work. Thank you in advance for your help.
from bge import logic import aud def main(): cont= logic.getCurrentController() own = cont.owner p_1 = logic.expandPath("\\sounds/endlevel.ogg") end = aud.Factory.file(p_1) name = "finish" start = 0 end = 1000 layer = 0 priority = 0 blendin = 0 mode = logic.KX_ACTION_MODE_PLAY layerWeight = 0.0 ipoFlags = 1 speed = 2.33 own.playAction(name, start, end, layer, priority, blendin, mode, layerWeight, ipoFlags, speed) main()