GameMaker: Studio

GameMaker: Studio

Find, play, and make games easily
Discover, rate, and download the best player-created games made in GameMaker: Studio for free. Or try making your own and share with the community. Click here to learn more.
bluetooth 2 Feb 21, 2013 @ 4:04pm
Can't get this to work for some reason.
I'm trying to make an object shoot another object to the right, and i'm not exactly sure what i'm doing wrong.
Here's what I have for the create even for the object that shoots:
shoot = 100
attack = false
and here's the step even for the object that shoots:
shoot -= 1
if shoot = 0 {
attack = true
}
if attack = true {
ID=instance_create(x,y,obj_bullet)
ID.direction=0
ID.speed=4
}
if shoot < 0 {
attack = false
}
Any help would be much appreciated.
< >
Showing 1-3 of 3 comments
Louen Feb 22, 2013 @ 2:15pm 
Mmmm, well I put it in a test and it worked fine for me. Shot to the right after 100 steps. However it did shoot twice. But being that the problem is you cant get it to shoot at all well I am pretty new to this so cant offer much help. I messed with it a bit but cant figure out whats wrong, it must be a problem with somthing else, this seems to work fine, one thing maby it is working but the "Bullet" is in the background behind some other objects? Sorry I can't be of much help, if I think of anything I will let you know.
bluetooth 2 Feb 22, 2013 @ 10:52pm 
That seems really weird. But since You got it to work, can you show any images of it by chance? I'm actually curious as to how it acts.
Louen Feb 23, 2013 @ 8:39am 
I would, but I just cant seem to get a good picture onto Steam. But to sumarise it moves right at a speed of 4, it makes 2 bullets the second is 4 pixls behind the first, I was able to fix this by moving the attack = false under the ID.speed=4, and deleating if shoot < 0 block.

Now you might try moving the "Direction & Speed" to the bullet itself, under the create event. Maby the "ID" is messing with your script. If I get a good picture I will post it but, its pretty simple, the bullet was a circle and the shooter was a squair...
Last edited by Louen; Feb 23, 2013 @ 8:40am
< >
Showing 1-3 of 3 comments
Per page: 1530 50