The Daily Click ::. Forums ::. Klik Coding Help ::. Platformer - no bullets all of a sudden !?!
 

Post Reply  Post Oekaki 
 

Posted By Message

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
17th October, 2003 at 17:15:56 -

I'm making a platformer that uses a custom movement. I've made a shooting event like this:

o Counter = 25
o Animation of Player = stopped
o Pressed Fire2
- Play sample "gun"
- Create Bullet at 0,0 from Player
- Create Shell at 0,0 from Player

Now, I've made the bullet's properties like this (bullet uses ball movement):

o Alterable value of A = 0
- Set Bullet's direction equal to Player's (so it shoots away from the player)
- Set Bullet's value A = 1 (so it doesn't keep changing dir.)

---
The Problem:

When I run around in my game, everything is fine, but then all of a sudden no bullets appear when pressing the shoot button and I can't fix it !

 
n/a

Deleted User
17th October, 2003 at 17:28:53 -

Replace the 'when pressed fire2' for 'user repeats on pressing fire2.'

 

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
17th October, 2003 at 17:46:47 -

That didn't make it work at all...

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
17th October, 2003 at 18:23:01 -

try getting rid of the bullets (they will continue to travel after leaving the screen)
there is a limit of 260 objects per level at any one time

make them destroy after hitting somthing and when closer than 0 pixels from windows edge
there is an event for that.

 
.

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
17th October, 2003 at 18:25:27 -

I already made the bullets get destroyed when they hit enemies, walls, backgrounds, or edges of screens... (also made a counter to count the number of bullets to make sure they got destroyed, and they were indeed destroyed)

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
17th October, 2003 at 18:30:33 -

What is the counter for, and does the player animation change from stopped?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

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!
17th October, 2003 at 23:14:21 -

Try including a set bullet speed = 100 (or whatever) when it's created, because I've noticed MMF sometimes doesn't start balls moving when they're created at runtime. I'm not sure exactly what circumstances cause this.
Also, delete the Animation of Player=stopped line and see if it works. Sometimes stopped animations don't register properly. If it works, use a separate event and a flag to limit the event.

 
n/a

istvan



Registered
  03/07/2003
Points
  1540
18th October, 2003 at 03:34:46 -

hmmmm... me, and anyone else helping me with my game Skelletor would be well versed in this bug or a bug similar to this.
Skelletor uses a custom engine also, but instead of bullets you shoot a boomarang. which is all good and fine until for no apparent reason shoot becomes impossible and your forced to fend for yourself. now, this is a great, bloody big bug, unless i want to make a new kind of platformer, where you accidently drop your boomarang at a random stage during the game because you have a hole in your pants.
EvisceratoR, i think the only way you can hope to be rid of the bug is to send someone experienced an open source of your game, but you may not want to do this cos of security reasons.
my accociates and i have been working on this problem for sometime now, it seems almost impossible. if we find a cure i will post it here and vis versa a hope.
sincerly yours,
istvan




 
'oh yeah? he's thrown a kettle over a pub, what have you done?'

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
18th October, 2003 at 04:59:56 -

Actually I solved the bug...I have a teleporter in my level, and it generates small particles (like every 0.05 sec or so) and even though they were set to be destroyed, they apparently still counted as an object, thus my game reached the object limit 20 secs later....i removed those particles, and everything worked fine....so maybe your game has too many objects in it ?

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
18th October, 2003 at 09:12:06 -

Yeah, the #1 rule in TGF is to make a counter that does nothing but add up active objects, that way you can see if you've gotten any problems.

 
Craps, I'm an old man!

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
18th October, 2003 at 12:35:29 -

i thought about doing that, but i was too lazy

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
18th October, 2003 at 13:36:46 -

how can you be too lazy 2 make 10 clicks? Oh wait, the same way I am.

 
Craps, I'm an old man!

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
18th October, 2003 at 14:29:08 -

That's one of the great things about laziness...it comes in all forms, and it comes everywhere

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
18th October, 2003 at 18:28:02 -

so why did you say you had made one earlier?

 
.

istvan



Registered
  03/07/2003
Points
  1540
18th October, 2003 at 18:40:54 -

hmmm, your theory might just be correct. ill check it out as soon as i get a chance

 
'oh yeah? he's thrown a kettle over a pub, what have you done?'
   

Post Reply



 



Advertisement

Worth A Click