Posted By
|
Message
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
26th July, 2007 at 13:42:07 -
This may be common knowledge, but I have an event where I want to shoot an object and not be able to shoot another while said bullet is either on the screen or otherwise not destroyed yet.
Now I have a flag, a "do not shoot while the shooting animation is playing", and a couple of other things that SHOULD not let another bullet be shot, yet sometimes there they go, about FIFTY bullets when you're jumping or whatever.
So I figure I'd try something like "create an object" with a ball movement, set the direction, max. speed, and I'd be golden. Truth is, I get the same crap results where you can accidentally spam a billion bullets sometimes.
Does anyone know a solid code for shooting a bullet and only ONE bullet until the other is destroyed / left the screen? All of my code should be fine, but it's not. Maybe there's another way around it, but I've never been able to make solid projectile codes in a MMF game yet.
Thank you!
(P.S: Rovert will thank you too!)
--
"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!
|
Joe.H Evil Faker
Registered 19/08/2002
Points 3305
|
26th July, 2007 at 14:02:13 -
Compare number of objects is your friend.
My signature is never too big!!!
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
27th July, 2007 at 08:41:57 -
What do you mean Joe.? I've never heard of compare number of objects before.
Do you mean the "test for something in a zone" event?
Sorry, I guess I'm still sort of new at a lot of things afterall
--
"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!
|
Joe.H Evil Faker
Registered 19/08/2002
Points 3305
|
27th July, 2007 at 08:55:29 -
If it's MMF 2, I have no idea what it is.
But in MMF it's in the special conditions bit, I think.
I think it's done by using the compare 2 general values event, then for the first part right click the bullet object and look for number of objects, or something.
Dont have MMF so I can't check.
My signature is never too big!!!
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
27th July, 2007 at 09:34:09 -
That's cool, it's something I haven't tried yet so I'll look into it later tonight.
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!
|
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
|
28th July, 2007 at 16:07:09 -
Object > Pick or count > Test for amount of objects
Ex. Amount of bullets = 0 + trying to shoot: shoot bullet.
Old member (~2004-2007).
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
28th July, 2007 at 18:18:24 -
Wow nice, yeah I would've never guessed that one. I'll try it in a few minutes.
--
"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!
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
29th July, 2007 at 06:40:32 -
DaVince, you lovable purple thing, you did it!
I didn't even realise that you could compare an object like that. I hardly ever use the "compare two things" aside from the two things being numbers or whatever. Think of all that I've missed!
I did the test for no objects in a zone, and made the zone size fit to whatever frame Rovert's in at the time. So far after at least an hour of playtesting, ZERO bullet bugs!
A W E S O M E!!
--
"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!
|
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
|
29th July, 2007 at 08:02:05 -
Yay, good to hear.
Instead of setting up a zone, you could just destroy the bullet as soon as it gets out of the visible screen (player X + screen width/2, player X - screen width/2, same for Y but with screen height). That way you can just "check for amount of bullets" without having to check in a zone.
Then again, it doesn't matter much. But it'll cut down on bullet existance within the visible screen, and you wouldn't have to check a certain zone anymore, just the entire frame.
Old member (~2004-2007).
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
29th July, 2007 at 09:04:21 -
I actually already had that event in there too, one that says if the bullet is approaching -15 pixels form the window's edge, make invisible and destroy. (The -15 pixels was so that it'd have to go a little off the screen instead.) I have to make it invisble because they have little "cross" explosions that happen and I didn't want players to see that unless they've hit an enemy or a brick wall with one.
--
"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!
|
Roseweave
Registered 31/07/2007
Points 341
|
2nd August, 2007 at 17:53:36 -
TGF/MMF has always been full of little bugs like this, usually involving objects disappearing etc. one of the reasons I switched to 2.
Check out my Telekinesis'em'up Thread and the ALICE Machines -
http://www.create-games.com/project.asp?id=1213
"Did you know there's a million bucks hidden in the house next door?"
"But there is no house next door?"
"No? Then let's go build one!"
|
|
|