I made a bullet actor and made a player actor and put it in the KEYDOWN input... I got it to work but when I hold the button down it streams the bullet..Im using the Create Actor in the Keydown. My skype is
When creating the keydown event, make sure that Repeat is set to no
Re: shooting
Posted: Thu Mar 22, 2012 7:18 pm
by yourownskills
oooh maaaaaaaaaaan, thanks for that... I could have swore I had that disabled. Thats what happens when you sit at the computer to long.
Re: shooting
Posted: Thu Mar 22, 2012 7:47 pm
by yourownskills
So right now I got the jump working and all that....But I cant just keep on going up if I keep in clicking the spacebar so it looks like im flying. How can I prevent that from happening?
So I got everything working...but for some odd reason I cant jump again if Im on this fence collision. Any ideas.
Re: shooting
Posted: Fri Mar 23, 2012 8:18 pm
by yourownskills
never mind figured it out...had to put a jump scripted in the player for the tree collider.
Re: shooting
Posted: Sat Mar 24, 2012 1:15 am
by yourownskills
i cant find something on double jump
Re: shooting
Posted: Sat Mar 24, 2012 5:04 am
by yourownskills
I have a question about HP and how to set it up..
I have my 3 different pngs that I want to represent the 3 different stages of being hit.... I dont know what to do next...any advice would be greatful. Im just an artist, not a programmer.
Re: shooting
Posted: Sat Mar 24, 2012 9:02 am
by skydereign
I assume you mean how to make the hp bar display (opposed to the player having different animations). To do that create a single animation for your hp bar actor. The first frame should represent 0 hp, the next one would be 1, and so on. In your case that means 0 hearts, 1 heart, 2 hearts, and 3 hearts. You also will need to create an hp variable. Set it to 3 when you want to initialize the hp (player's create actor for instance) then each time the player gets hurt reduce it by 1. And for your actual hp display actor, in its create set its animation direction to stopped (so it doesn't cycle through the animation). Lastly to display, you can use this.
animpos is the frame that the animation is on. You'll notice if you made the animation correctly, when hp=0 the frame is 0 (with 0 hearts) and so on.
Re: shooting
Posted: Sat Mar 24, 2012 9:18 am
by yourownskills
thanks, ive been up forever trying to figure out the best way to animate his attacks....
im no programmer, I just started using this a few days ago. im having problems with seeing the entire attack animation... I select key down and pick my attack animation..when i go to test it..its to fast and doesnt finish because i release the button that im using for the attack... so it may play 2 frames out of five. how can i get it to play the entire attack animation even though i let go of the attack button?
Re: shooting
Posted: Sat Mar 24, 2012 9:23 am
by skydereign
Releasing the key doesn't by default change the animation back to the other one. That must be something you added. So, the way you would do it is have the keydown (no repeat) change the animation to your attack animation. Then, on the animation finish event for the attack animation, you'll probably want to reset it back to the player's normal animation, so do so in that event.
Re: shooting
Posted: Sat Mar 24, 2012 10:35 am
by yourownskills
im trying to get my character to attack facing right as well as attacking when facing left..and while jumping... i did ADD EVENTS key Down...change animation
I followed a tutorial on youtube for the bottom code, i dont really understand it. Im a graphics guy. So I tried adding the attack animations differently from what i learned in a different tutorial.
this is in my Player--Draw Actor.....so i can move left and right and jump
char *key=GetKeyState(); int dir=key[KEY_RIGHT]-key[KEY_LEFT]; int j=key[KEY_SPACE]; switch(dir) { case 0: //none or both if(animindex==0) { ChangeAnimation("Event Actor", "charStopLeft", NO_CHANGE); } else if(animindex==1) { ChangeAnimation("Event Actor", "charStopRight", NO_CHANGE); }
break;
case -1: //Left Collider. x-=5; ChangeAnimation("Event Actor", "charLeft", NO_CHANGE); break;