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?
Printable View
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?
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.
But heres what *doesnt* work. Duplicate the smiley so there are two bullets being shot at the same exact time.
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.
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.
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.
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.