Hey, I was wondering how you get the sensor sprites to go right around the player sprite. The top, left and right ones won't go as close as they can to my own costume set, they stay in the place of the old one... Do I have to get rid of all of the first costume set?
Archmage, if you're reading this, I just wanted to say that your template is awesome
Offline
Just open the costumes for the sensor sprites and move them.
Offline
I don't understand what you mean... I've tried repositioning them, but they always revert back to their first positions.
Offline
If they revert that means you were dragging the sprite or not saving the costume.
If you touch the scripts or drag the sensor sprites on the stage you are doing the wrong thing.
You need to click open the sensor sprite, go to costumes, then edit the little sensor shape costume.
Alternately, if that is too difficult, just alter the size of your character sprite until it is similar to the size of the template character sprite.
Last edited by archmage (2011-02-03 12:11:15)
Offline
Oh, wait, I've got it. Something odd happened with this pole I put as part of the first terrain; whenever i touched it, I fell through the ground...
Offline
There is no way for me to see what is wrong without actually seeing the project at this point.
Offline
It doesn't matter at this point. Don't worry about it I also wanted to ask, how would you add a ducking action to the player?
Offline
The same way you the rest of the animations are added. You set up a new stance, and when the down arrow is pressed you go to that stance.
Offline
I tried that. I used an If and Else block. The If part for when down was pressed then go into a duck, and the Else part for if it wasn't then go into the standing stance. It's the Else part that I'm having trouble with. I left it as go into stance 1 when down isn't pressed, but then I had to find a way of getting the other animations to work, because it would just stay stuck in stance 1. I nearly had it right when I said, "Else, If not up pressed or right pressed or left pressed or SPACE pressed, then go into stance 1." When I used this, it wouldn't complete the jumping animation, because you usually let go of the up key when you're in the air, right? When you stop pressing it, it goes back to stance 1... Can you suggest an easier way of making sure that if down isn't pressed then continue with all other animations as normal?
Offline
The way I suggested is still the best way. I updated the original project to include ducking so you can check out the code in that project.
Offline
Oh, that's absolutely brilliant! Hah, shows what little I know.
Sorry to bother you so much, but I need my character to be able to die. How would I go about doing this so that the character would display an animation, then go back to the beginning of the level with one less life?
Thanks again
Offline
Well, health is already in the game, I just don't show it. So you first have to set up a stance for it (death), then create the condition (health<1) to activate the stance. At the end of the death stance animation you do something (like make a broadcast) to reset the game.
Again, I updated the original project to show this in action.
Here are some other things you should know:
-All stances are activated in the same area in the script
-The higher priority stances are located further down in the script
- the (if stance > 5) means that stances greater than 5 do not allow the player to move and stances above this cannot be overwitten before they finish
Last edited by archmage (2011-02-06 14:11:14)
Offline
Thanks a lot Archmage You've been really helpful.
Sorry I haven't been replying or anything; I couldn't get online.
Is there any way to add a y axis scroll too?
Offline