The Daily Click ::. Forums ::. Klik Coding Help ::. Shooting Glitch?
 

Post Reply  Post Oekaki 
 

Posted By Message

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
26th July, 2006 at 15:31:55 -

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!

Werbad



Registered
  18/09/2002
Points
  235
26th July, 2006 at 15:36:36 -

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

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
26th July, 2006 at 15:41:58 -

I did originally have only 1 bullet object that got shot in the 4 directions, but I got the same result.

I made them 4 separate objects afterwards because I thought that this originally didn't work because the all got shot the same way (up).

When I took the "disappearing" animation out totally, the bullet just flies upwards, but still, only the one going up.

 
--

"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!

Jakob37



Registered
  07/08/2005
Points
  541
26th July, 2006 at 15:45:33 -

I had that problem once. I changed the "animation type" from shooting to user animation.

Then it worked for me

Image Edited by the Author.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
26th July, 2006 at 19:08:54 -

That's really weird, but I'll try it. 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!

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
27th July, 2006 at 11:29:06 -

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.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
27th July, 2006 at 11:42:07 -

^^ 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!

Jakob37



Registered
  07/08/2005
Points
  541
27th July, 2006 at 13:13:19 -

Heh, that way was a even more weird than the way I did.

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click