The Daily Click ::. Forums ::. Klik Coding Help ::. running out of ammo...
 

Post Reply  Post Oekaki 
 

Posted By Message

Erik Neumann



Registered
  25/11/2002
Points
  108
20th November, 2003 at 09:38:57 -

i am having an issue where. my main character seems to run out of bullets. he stops shooting when i hit the shoot button. it seems to be the result of too many active objects on the screen, but i have done things like add invisible walls that follow at the edge of the screen and destroy bullets that hit them but it still happens. anyone have the fix?

 
www.drlight.cjb.net

lauri



Registered
  04/05/2003
Points
  57
20th November, 2003 at 10:33:13 -

when the bullets position is closer than 5 pixels from the screens border... you will find it...


 
make things klik.

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
20th November, 2003 at 11:47:05 -

This happened to me once too. It was because i had too many objects in the level (i had an active object emitting particles; too many i found out)...i stopped it from making particles, and it worked.

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
20th November, 2003 at 22:48:59 -

Check to see if your invisible barriers outside the frame are not set to inactivate when out of screen, and that collisions in invisible playfield is turned on for that frame.

 
n/a

cake



Registered
  13/12/2002
Points
  1173
21st November, 2003 at 01:15:06 -

Never rely on collisions to destroy unneeded things. Use coordinates.

4 events (it can be done in two using absolute values but Im too tired to remember that at the mo):

X position(bullet) < X Left(Screen): Destroy bullet
X position(bullet) > X Right(Screen): Destroy bullet
Y position(bullet) < Y Top(Screen): Destroy bullet
Y position(bullet) > Y Bottom(Screen): Destroy bullet

Better yet assign all particles to a group/qualifier and replace bullet with the group, thus eliminating all unnecessary AO not on the screen in 4 events

 
n/a

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
21st November, 2003 at 07:34:01 -

hmm, that there's a good method

 
n/a

Erik Neumann



Registered
  25/11/2002
Points
  108
24th November, 2003 at 01:06:21 -

thank you lauri and biax! your suggestions worked!

 
www.drlight.cjb.net

Andy G



Registered
  07/07/2002
Points
  860
24th November, 2003 at 23:36:22 -

Congrats on getting it working! But also, if this happens again in the future, make sure something in the events is creating a bunch of objects that you don't want it to be creating on accident. I don't know how many times I've done this, but enough I assure you to want to warn other people. For example, I'd have something like "Always: When (bla bla bla)...create object (bla bla bla)" and it'd create thousands of those in almost an instant and almost nothing would work. Anyway, I hope that made sense...heh. Good luck.

 
Beach Invasion II will come out if you are lucky.

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
25th November, 2003 at 01:35:32 -

I sure hope you found the "limit action to happen once if looped-or-whatever-it's-called" option

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
25th November, 2003 at 06:16:32 -

Yes, also I usually have a counter set to "nobjects" so that I can keep track of how the game's coping.

 
http://www.davidn.co.nr - Games, music, living in America
   

Post Reply



 



Advertisement

Worth A Click