# Multiple fireballs gml

I am programming a bossfight in gamemaker, and I want my boss to shoot multiple fireballs simultaneously, but all in a bit of a different direction, a little bit like this, from rogue soul: It (obviously) doesn't work, and I have been trying for over an hour. My script is:

//in the create event of fireball 1
direction = hero + 10
speed = 12

//in the create event of fireball 2
direction = hero + 5
speed = 12


and so on.

It just refuses to work. The fireballs go a completely random direction, independent of where the hero is.

• Have you been able to shoot one fireball in the direction of the hero? – Vaillancourt Jun 29 '19 at 20:50
• It may be happening that from the position of the hero being received from various moments. Posting an image of what is going on in your game can help. Without first seeing it, I can recommend one more thing. Start with the first fireball with (hero - 10), second (hero - 5), third (hero), fourth (hero + 5) and fifth (hero +10). – Boneco Sinforoso Jun 29 '19 at 21:15
• How do you compute your hero direction variable? – DMGregory Jun 30 '19 at 12:27
• I figured it out myself. Thanks very much for the suggestions. And yes, next time I will put a picture of my game in the question :) – Chris V Schothorst Jul 1 '19 at 14:57
• Consider posting an answer showing what you did to solve your problem. – Boneco Sinforoso Jul 2 '19 at 0:55