robert
04-18-2007, 04:10 AM
I'm having a hard time figuring out how to do these, and the Programming in Alice book that I have I don't think explicitly answers them (the collision detection one perhaps in a roundabout way, but not so much on the sound one that I can see):
1) I have music playing in the background during the menu, but since it is dictated by user when the menu is exited, I can't set a duration for the audio file. I was wondering if there is a way to stop a source from playing the sound once you transition scenes? Tried having the same source play another sound file (in the hope that I could use a sound file with silence) but all it did was try and play both.
2) There is a fight scene in which the player controls the player, I can set it up where if the player is within distance of the walls, he steps away from it, but realistically, I'd like it just to disable the PJ3.walkForward method if at all possible when he's within distance of the edge.
3) in the combat part, I have it set up for the space bar to do a nested if statement of punch 1, punch 2, and kick. I would like for when he does the actions, for it to push the target back. I am unaware exactly how I would do this without making it where when the character is within distance of the target, it moves. And also, how do you ensure that it moves the target in front of it?
thanks in advance for any assistance you can give
1) I have music playing in the background during the menu, but since it is dictated by user when the menu is exited, I can't set a duration for the audio file. I was wondering if there is a way to stop a source from playing the sound once you transition scenes? Tried having the same source play another sound file (in the hope that I could use a sound file with silence) but all it did was try and play both.
2) There is a fight scene in which the player controls the player, I can set it up where if the player is within distance of the walls, he steps away from it, but realistically, I'd like it just to disable the PJ3.walkForward method if at all possible when he's within distance of the edge.
3) in the combat part, I have it set up for the space bar to do a nested if statement of punch 1, punch 2, and kick. I would like for when he does the actions, for it to push the target back. I am unaware exactly how I would do this without making it where when the character is within distance of the target, it moves. And also, how do you ensure that it moves the target in front of it?
thanks in advance for any assistance you can give