Game Maker Tutorial - 2 Direction Shooting
Вставка
- Опубліковано 8 вер 2024
- Make Video Games ► www.codingmade...
In this tutorial I show how to shoot in 2 directions. This is a good game feature to have as it allows for a main mechanic in your game.
► platform tutorial ◄
• Game Maker Tutorial - ...
I'm the founder of codingmadesimple.com that hosts high quality, fun to learn and straight to the point course material for game developers. I'd really appreciate it if you'd check out my content.
Twitter ► / realtutsgml
Google+ ► www.google.com/...
Patreon ► / realtutsgml
Have fun learning!
• Game Maker Tutorial - ...
@RealTutsGML your player sprite ok go into your player sprite.....now you see where it says orgin on the bottom left......click center and make sure its lined up with your gun horizontally ok :D
I have a slight problem. the bullet is being generated at a crazy amount to the pint where it is just a long line of bullets that wont end. The only think i changed from the example was the last piece of code for the bullet firing key. I wanted mine to be S so here's what I put..
if keyboard_check_pressed("S") {instance_create(x,y,GbulletS)}
thanks very much youre tutorials have helped me out alot since I first saw them so long ago
I'm sure after 4 years you got it to work, but just in case, what I did using A button to shoot was:
if (keyboard_check_pressed(ord('A')))
{
instance_create(x + 16, y + 24, Pistolb);
}
(note: on mine, I have a 32/32 sprite and the "+##"s just center it on the character, and of course, Pistolb is just my bullet obj)
@KogC4600DK place the orgin of your sprite of the player at his gun
mine just goes to the left even though i am facing right.
When I said hspd += 10 or hspd -= 10 it doesn't move.
@carlosrubenromero thanks
check out my platform engine tutorial
Believe me that is not good!