GameMaker: Studio

GameMaker: Studio

Hitta, spela och skapa spel enkelt
Utforska, ladda ned och rösta på de bästa användarskapade spelen gjorda i GameMaker: Studio gratis. Eller försök att göra ditt eget spel och dela med gemenskapen. Klicka här för att läsa mer.
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.
< >
Visar 1-3 av 3 kommentarer
Louen 22 feb, 2013 @ 14:15 
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 22 feb, 2013 @ 22:52 
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 23 feb, 2013 @ 8:39 
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...
Senast ändrad av Louen; 23 feb, 2013 @ 8:40
< >
Visar 1-3 av 3 kommentarer
Per sida: 1530 50