Hi, I'm sure this is basic, but I seem to not be able to get my hero to fire 4 simultaneous bullets in 4 different directions (N, S, E, & W). I have 4 separate active objects (one for each direction), and when the guy "fires" I have the events set up like:
Hero Shoots "BulletUP" at Speed 20 in (up direction)
Hero Shoots "BulletDONW" at Speed 20 in (down direction)
Hero Shoots "BulletLEFT" at Speed 20 in (left direction)
Hero Shoots "BulletRIGHT" at Speed 20 in (right direction)
Now what's weird is all that happens when I press "fire" is I get one bullet
(BulletUP) going up, and its "disappearing" animation is playing, and then of course gets destroyed. I don't have any destroying of the bullets code in the application yet though! I figure it's getting shot upwards because it's the 1st direction I tell it to do. But it's like the other directions / bullet objects don't get read by the program or something.
Does this happen to anyone else?
Thanks!
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
First, you don't need 4 different objects for different directions... Just add different directions in the same object...
But i don't understand why that isn't working... seems perfectly fine to me
If you mean you want the character to shoot four at once then:
Condition: Actions:
User presses fire Character shoots "bullet" in direction (up)
Character shoots "bullet" in direction (down)
Character shoots "bullet" in direction (left)
Character shoots "bullet" in direction (right)
Just use that wheel that lets you select direction.
I'm not sure this is what you meant though .
Discarded pizza boxes are an indispensable source of cheese.
^^ I tried that before Markno2, but it didn't work.^^
The good news is that NOW it does, but it was weird what was happening.
I found out by much trial and error that what was happening was that the AMOUNT of events on the single line had something to do with it. In other words, the more useless lines I threw between each shooting event, the better it worked- up until all 4 bullets shot at once.
Like this:
Upon pressing (fire) then shoot bullet in direction UP
Change hero animation to casting
Sub MPCOST from MP("hero")
Shoot bullet in direction DOWN
Play the firing sound
(useless line)
Shoot bullet in direction LEFT
(useless line)
(another useless line)
Shoot bullet in direction RIGHT
Now this reflects the actual order that the program will execute the events (If you double click on the event you'll get the actual line order is what I mean). And I don't know if it has to do with my crappy computer or not, but the more useless throwaway lines I put between shooting events made a difference. Now it actually works!
Hooray for good coding! (??)
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!