Object Grouping re:360 Directions
Yeah it's me again...if you'll look deeper into this forum's board you'll find a post by me called "360 Directions" where I had trouble with a 360 shooter...well, I'm having another problem.
Spawning one bullet is fine but going into multiples becomes a royal chore. I can't spawn more than one bullet at the same time without having to make a small list of events for each seperate bullet. This wouldn't be too much of a problem if not for the fact I need well around 100 bullets spawned almost all at once.
So I'm afraid I need either an alternative or some workaround. I attempted using qualifiers but of course, it gave me no luck. Please, any help is greatly appreciated and anyone willing to help will be thanked generously.
Re: Object Grouping re:360 Directions
Use spread value and loops.
Always
Spread value '0' in ID (alterable value) for object 'bullet'
Always
Start loop 'bullet move' NOObjects"bullet" times.
On loop 'bullet move'
ID of 'bullet' equal to loopindex 'bullet move'
(move bullet actions go here.
For those first two 'always' events, they MUST be kept separate or it won't work.
Re: Object Grouping re:360 Directions
Yeah I've already known that, I've been using it for some time now but since then, I've run into a problem I just stated. Let me explain a bit further...
Let's say I want the player to shoot three bullets at a time, right? For each of the three bullets I need to:
-Create the bullet at where the player would shoot it
-Do the two always events
-Go onto the loophandling which moves the bullet
-Rinse and repeat
I have to do the same pack of events seperately for each seperate bullet the player shoots. Now, this is where it gets tricky.
Let's say I want the enemies shooting bullets in a 360 manner too. For each bullet that belongs to one enemy, I have to copypaste the previous events, fit them to that particular bullet, and repeat this for as many enemies there are in the stage, possibly multiplied by how many bullets at a time the enemy wants to shoot. So:
>3 Bullets the Player shoots at a time
>How many enemies in the stage (Let's say 20)
>How many bullets at a time each enemy wants to shoot (Let's go with 2)
>How many events it takes to move each bullet
All this combined makes...
3+(20*2)*5=215
That's a lot. What's worse is that what I'm trying to do will likely require roughly three to ten times that many bullets...
I've actually come to the point to where the last time I tried it, MMF's loops failed after 5 minutes and the bullets simply stopped moving altogether.
What I'm asking for is a workaround. I've tried making all the bullets a part of a qualifier but that never worked the way I wanted it to unfotunately. Unless I'm doing it wrong, heh.
So that's my problem a bit more in-depth. I apologize if it wasn't clear before.
Re: Object Grouping re:360 Directions
Quote:
Originally Posted by JJames19119
I've actually come to the point to where the last time I tried it, MMF's loops failed after 5 minutes and the bullets simply stopped moving altogether.
Do you have an event where when the bullet is outside the play area it destroys? If not, the events won't work. Happens to me, Too many bullets and things stop working.
Re: Object Grouping re:360 Directions
Actually yeah I do. After thinking about it I realized it wasn't after 5 minutes it was after going through around the 100th~ loop I set up. It also runs quite slowly regardless...I would seperate each bullet into a group but that would take so much time...
Re: Object Grouping re:360 Directions
Wait a minute............................................ ..................................................
(1 minute later)
Why aren't you using "Shoot Object"?
Re: Object Grouping re:360 Directions
Because Shoot Object will only shoot an object in one of 32 directions, which looks extremely lame and makes the gameplay very terrible.
I would love to use it, it would make my life so much better. But as of now anyone who uses MMF is forced to use Sine and Cosine to get any sort of 360 movement because 360 movement is NOT built in easy in MMF.
Re: Object Grouping re:360 Directions
Actually there is a fairly simple way to make a 360 degree shooting movement using the Clickteam Movement controller and vector movement. If you want I can make a quick example.
Re: Object Grouping re:360 Directions
Please do! That would be wonderful, thank you so much.
Re: Object Grouping re:360 Directions
Here is the link to a 360 example I made. You are the smiley face and you move around, press space to fire at the active in the middle.
http://putstuff.putfile.com/90356/47425
Re: Object Grouping re:360 Directions
Wow... the vector movement just as a "Set direction toward *object*" action huh? :I
This is a nice example but what about if you had more than 1 bullet being created at once?
Re: Object Grouping re:360 Directions
It works fine with as many bullets at a time as you need. To prove my point, just change the "Upon pressing space bar" to "Repeat while space bar is pressed" The bullets still work fine.
Re: Object Grouping re:360 Directions
But heres what *doesnt* work. Duplicate the smiley so there are two bullets being shot at the same exact time.
Re: Object Grouping re:360 Directions
Well, then you have to do fastloops the number of times that there are smileys and spread the value of the smileys. That should work.
Re: Object Grouping re:360 Directions
To make it work for multiple smilies, here's what you do.
Make these events:
'Always'
- 'Spread value '0' in Alterable Value X of Smilies.'
'Always'
- 'Start loop "Smilies" (count # of objects 'Smilies') times.'
Then for your shooting event,
'On loop "Smilies"'
'LoopIndex( "Smilies" ) is equal to Alterable Value X of Smiley'
'Upon pressing space bar'
- Put your shooting code right here.
Hope you can understand that. Let me know if you need help.
Re: Object Grouping re:360 Directions
Yeah I've done the whole fast loop thing, but I think my mistake always has been instead of doing 'always' spread values, I did it at 'start of frame' so I was running into limitations.
Re: Object Grouping re:360 Directions
What would make things so much easier is if someone designed an extension that had the same abilities as "Shoot Object" but in all 360 directions. But that's probably asking for a bit much...
I know some C though so I might grab the extension SDK and take a whack at it myself.