The Daily Click ::. Forums ::. Klik Coding Help ::. Problem with Sketchy's 360° Shooting Gallery...
 

Post Reply  Post Oekaki 
 

Posted By Message

Daniel McCarthy



Registered
  10/09/2012 10:47:12
Points
  3
11th September, 2012 at 11/09/2012 10:29:03 -

Hey guys,
I've stumbled over the Shooting Gallery by Sketchy. The Problem is, that I can't figure out how to shoot objects. I have done everything like Sketchy has done in his tutorial, but nothing happens.
Maybe someone can help me.
Cheers, Daniel

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
11th September, 2012 at 11/09/2012 12:34:41 -

I personally love the engines that Sketchy has put together, and if he doesn't speak up then I reckon I can give you some insight.

When you say you're not able "to shoot objects," which do you mean?

- The bullets I launch don't seem to hit any targets.

OR

- I press my "shoot" button, but no bullets are created.

Those are two very different problems, and have different solutions.

Secondly, is there a particular engine you're working with? Let us know.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
11th September, 2012 at 11/09/2012 12:37:16 -

It would probably help if you could upload a file.

Which specific example are you using?
I wouldn't recommend you copy either of the last two frames, as they had a fairly major bug (see below) and can also be coded more efficiently now thanks to the ForEach extension (which didn't exist at the time).
eg. http://skydrive.live.com/redir?resid=B1E7EE094271BBDA!535

Also, all the frames contain the same bug which makes them stop working properly when multiple objects are shooting at the same time. This is because MMF2 can create any number of bullets per frame, but it will only set the initial values (position, angle, speed, etc) of the last one it creates. To get around that, you have to use a loop so that only one turret is shooting at a time.
eg. http://skydrive.live.com/redir?resid=B1E7EE094271BBDA!404 (see "Loop C" in the last frame).

One day, I will get around to updating the examples...

In the meantime, if you can describe *exactly* what it is you're trying to do, we can probably help you out


Edited by Sketchy

 
n/a

Daniel McCarthy



Registered
  10/09/2012 10:47:12
Points
  3
11th September, 2012 at 11/09/2012 14:33:18 -

...oh I'm sorry, I could be more specific. So I want my moonlander to shoot in the direction of my mousepointer, but it actually doesn't shoot anything, it just draws the bullets at the position of the moonlander like in MS Paint so I'm able to draw points. I want to shoot the bullets and not just draw them at a static position

 
n/a

Daniel McCarthy



Registered
  10/09/2012 10:47:12
Points
  3
11th September, 2012 at 11/09/2012 15:09:19 -

Success, I think I've made a mistake by setting the variables. After that I ran into other problems, but I solved them, too.
Anyway, thanks for your help.
Cheers,
Daniel

 
n/a
   

Post Reply



 



Advertisement

Worth A Click