Posted By
|
Message
|
siven I EAT ROCKS
Registered 03/11/2008
Points 604
|
7th February, 2014 at 07/02/2014 21:32:39 -
so im having this problem where if i have more than one bullet hit the same target at the same exact time it only does damage for one bullet. the code reads something like
+bullet is overlapping group enemy
->subtract alterable valueA(bullet damage) of bullet from alterable valueA(HP) of enemy
any idea how i can make it so it registers all the bullets? cuz as of right now shotguns and any other kind of weapon that shoots more than one bullet are practically useless because of the drop in damage per bullet to make up for the increase in projectiles.
[Game design makes my brain feel like its gonna explode.]
|
nim
Registered 17/05/2002
Points 7234
|
7th February, 2014 at 07/02/2014 21:56:26 -
Originally Posted by siven +bullet is overlapping group enemy
change to:
+Collision between "Bullet" and "Group.Enemy"
//
|
siven I EAT ROCKS
Registered 03/11/2008
Points 604
|
8th February, 2014 at 08/02/2014 01:20:01 -
Ok, now im incredibly confused. thats how it was set up before, i changed it to overlapping because i thought it might fix the problem, and it didnt so i posted this. for shits and giggles i switched it back to collision instead of overlapping and this fixed it. any idea why?! cuz this isnt the first time ive had an event not work, change it, and change it back to what it originally was and then it work again. is this a bug with mmf2? anyhow, thanks, although i feel kinda dumb
[Game design makes my brain feel like its gonna explode.]
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
8th February, 2014 at 08/02/2014 18:12:34 -
No it isn't a bug. Overlapping triggers once if any objects are overlapping no matter how many, but it applies to all the objects. It was a design decision.
n/a
|
nim
Registered 17/05/2002
Points 7234
|
8th February, 2014 at 08/02/2014 18:30:10 -
Originally Posted by sivenOk, now im incredibly confused. thats how it was set up before, i changed it to overlapping because i thought it might fix the problem, and it didnt so i posted this. for shits and giggles i switched it back to collision instead of overlapping and this fixed it. any idea why?! cuz this isnt the first time ive had an event not work, change it, and change it back to what it originally was and then it work again. is this a bug with mmf2? anyhow, thanks, although i feel kinda dumb
One of the other guys who are more experienced with MMF can chime in but I'm pretty sure that it's different because "Collides with" is an immediate condition (red) while "Object Overlaps" is not.
There aren't many "bugs" with MMF/CF2.5, it's just difficult to understand its logic sometimes. You might have had *almost* the same event but the order of conditions matters, as does the order of actions.
//
|
Pan-tosser
Registered 24/10/2008
Points 520
|
9th February, 2014 at 09/02/2014 00:55:10 -
I always thought to many changes to any chunk of computer code could lead to a unstable build. I have had the same thing happen while learning C++.
Good program planning and placebo code test beds are a must. In any computer project you can do. With any of the products out their.
but that's just how i feel about. I could be wrong.
Back to talking about the bullets. Have you tried adding a damage modifier.
-> subtract alterable valueA(bullet damage)*number_of_bullets
Where number of bullets is a stored value that always counts the created number of bullets in play area.
https://www.facebook.com/nathon.brown.7
|
nivram
Registered 20/07/2006
Points 171
|
9th February, 2014 at 09/02/2014 03:06:45 -
I have been beta testing a long time with Clickteam. Myself and the other testers have always been taught to always use overlapping. Not collides with.
Marv
458 MMF2 & CTF 2.5 examples and games
http://www.castles-of-britain.com/mmf2examples.htm
|
nim
Registered 17/05/2002
Points 7234
|
9th February, 2014 at 09/02/2014 04:43:13 -
I normally would use Overlapping but in this case one works and the other doesn't. It's one of a few ways that the problem could be solved but it's an easy fix. Any reason why the testers were told to avoid using Collides With? Seems kind of funny that testers would be told not to use something because it doesn't work. Isn't that the point of testing?
//
|
siven I EAT ROCKS
Registered 03/11/2008
Points 604
|
9th February, 2014 at 09/02/2014 06:23:01 -
@pan-tosser i had thought about that but wouldnt it count all bullets in view and not just the ones colliding with the detector?
@nivram i would rather use it, but it didnt work
Edited by siven
[Game design makes my brain feel like its gonna explode.]
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
9th February, 2014 at 09/02/2014 17:13:53 -
Like Nivram says, it always used to be that you had to use the "is overlapping" condition in most cases.
I'm pretty sure the "collides with" condition was tied to the built-in movements, and wouldn't work with custom engines. This may well have been fixed by now (possibly a long time ago - like Nivram, I've always just avoided it).
Clickteam certainly revamped the collision-detection system at some point, and a few of my very old examples no longer work properly because of it.
n/a
|
Pan-tosser
Registered 24/10/2008
Points 520
|
10th February, 2014 at 10/02/2014 01:13:50 -
@ siven i have used that kind of design before. it worked well for me because the spacing of my bullets were close together. and the enemies had a slow hit recovery time. So it was a given all the bullets would land while the enemy was stunned.
I don't use the design anymore because their isn't any way to some of the bullets hit and some miss.
but i also use overlapping instead of collides, and i'll even change my designs to ones that work with overlap. Because of the problems i have ran into with collide makes me afraid to use it.
https://www.facebook.com/nathon.brown.7
|
siven I EAT ROCKS
Registered 03/11/2008
Points 604
|
10th February, 2014 at 10/02/2014 21:41:29 -
@pantosser yeah thats not gonna work for this project cuz there are a lot of bullets that miss and lots that hit and no way to tell how many are hit and how many are miss
[Game design makes my brain feel like its gonna explode.]
|
|
|