We go through how to make our character to shoot bullets
Пікірлер: 20
@SouperFisHMaN5 жыл бұрын
How can i change the position of where the bullet comes from the actor?? To make the bullet look like it comes from a gun
@KevinGaning4 жыл бұрын
why my run left bullet go left, but if my run right bullet go left can you explain it to me?
@techismad4 жыл бұрын
This is going to be hard to solve without seeing your code blocks. The things that I can guess are the following: Did you get the name of the right animation correctly? Did you set the x speed of the bullet properly? So right bullet = positive number and left bullet should be negative number
@LarryWolf19194 жыл бұрын
@@techismad My guess is that these people having problems shooting only to the right (or only to the left) don't have an animation set to move to the left, and move to the right respectively. They probably went the other way (no pun intended) and have only the animation moving to either side, and use the GROW code block to rotate the animation -100 in the x axis when moving to the opposite side. This way Stencyl interprets as always having the animation facing the original side, even tough it was distorted via code.
@kathy53995 жыл бұрын
So like how come my bullets show up way above the character when I set the x and y of the bullet to be that of the character?
@techismad5 жыл бұрын
Gnarfox - this might be the way the bullets are designed. If your bullets are really big, this can affect the position. So lets say you’ve got a transparent png as your bullet, the png might be big with a small bullet in the middle of it.
@kathy53995 жыл бұрын
Thank you, but I've figured out how to fix the problem. I just had to add or subtract (x,y) values from my actor to get it to the spot I wanted the bullets to show up. This tutorial really helped though, so thank you!@@techismad
@denemeklazım1Ай бұрын
Thank you
@heidi28856 жыл бұрын
how do u stop it from collideing with the person that is shooting?
@adriankmiec98756 жыл бұрын
have you figured it out yet?
@heidi28856 жыл бұрын
No
@adriankmiec98756 жыл бұрын
go to settings, Groups, create new ( Call it bullet), make it collide with everything except for players, then go to your bullet properties, switch group to bullet, then, go to your character, properties, and switch it to players.
@noormoosa80334 жыл бұрын
the bullet works great when i shoot on the right side but doesn't work on the left side even though i put negative in speed
@techismad4 жыл бұрын
what happens to the bullet? Does it travel to the left or not move?
@noormoosa80334 жыл бұрын
Mad Tech not move
@samwarren60086 жыл бұрын
What if I wanted the player to have a certain amount of ammo?
@techismad6 жыл бұрын
That's where things get interesting! Set up a new attribute for your character called ammo. Set the value of ammo to 10 or 100 or whatever your starting ammo is. In the code for shooting bullets, simply set your ammo attribute to -1 each time a bullet is fired. You will then need a block of code that checks if your ammo is zero or not. If the ammo reaches zero, you'll have to stop the bullets from being created and firing. You'll then need to figure out how to reload the ammo - either after some time, or when you pick up so more ammo.
@samwarren60086 жыл бұрын
A game attribute?
@samwarren60086 жыл бұрын
And which section of shooting bullets? There is, Set Shoot, or Shooting.