The Daily Click ::. Forums ::. Klik Coding Help ::. Worms-type bazooka
 

Post Reply  Post Oekaki 
 

Posted By Message

en kerro



Registered
  21/10/2004
Points
  578
30th November, 2005 at 13:31:05 -

Does anyone know how to make a worms-type bazooka? I have tried to make the gravity, but it's veery diffycult for me, I'm not good with these x & y things! Help me, someone there.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
30th November, 2005 at 13:37:43 -

And also: How to make worms ninja rope engine?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
1st December, 2005 at 07:45:26 -

38 views and no one knows?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
1st December, 2005 at 08:15:23 -

Well, the ninja rope in worms wasn't too complex. It could probably be done with some trig and a fairly basic physics engine. I'm sleepy so that's all you'll get from me now.

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
1st December, 2005 at 12:53:05 -

Now it's 63 views... and NO ONE KNOWS (or doesn't want to tell... grr!)

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
1st December, 2005 at 13:06:06 -

The bazooka thing doesn't seem to hard. I'm working on a ninjarope thingie myself right now. I used trig for my last attempt, and it kind of failed. It's a lot harder than it seems (the movement of the rope worked well, but it's a bitch with collisions and stuff). I'm trying to use vectors right now, see how that turns out.

 
This space is for rent

en kerro



Registered
  21/10/2004
Points
  578
1st December, 2005 at 14:40:49 -

I mean that i don't know how to make the bazooka's bullet object fall down, like in worms.I have tried, but I have failed many times. Hernan, could you mail me how you made that bazooka thing possible? I have no idea, and whan I tried that ninja rope with drawline object, I failed too...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
1st December, 2005 at 15:19:14 -

I think you misunderstood me. I meant it doesn't seem very hard to make one, but I never made one. I don't really have the time to make one right now, but I'm sure there are enough people that know how to make it.
If I somehow make time, i could do it for you. So only if you really can't find anyone to do it, dc mail me or something and i'll try.

 
This space is for rent

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
1st December, 2005 at 15:28:16 -

Using a custom movement engine based on vertical and horizontal velocities would be easiest for the bazooka. The bazooka should have two alterable values Xspeed and Yspeed for the horizontal and vertical speed.
Always: set bazooka's x to x + Xspeed
set bazooka's y to y + Yspeed

To simulate gravity, always subtract a certain amount from Yspeed. To simulate wind, always add or subtract a certain amount from Xspeed. If you want to not lose precise collisions, use the move safely object or a fastloop to move the bazooka one pixel at a time, checking collisions each loop.

For the actual firing, you would need to use trig.
While space is held and isFiring = 0 and power < 100: add to power, set isFiring to 1;
While space is not held and isFiring = 1: create bazooka, set Xspeed to cos(angle) * power * (maxpower/100), set Yspeed to sin(angle) * power * (maxpower / 100), set isFiring to 0;
ile space is not held and power >= 100: set power = 100, create bazooka, set Xspeed to cos(angle) * power * (maxpower/100), set Yspeed to sin(angle) * power * (maxpower / 100), set isFiring to 0;

For ninja rope, you can use trig to position an object at a certain angle and distance from a point also using trig.
Set worm's x to anchor's x + cos(angle) * ropeLength;
Set worm's y to anchor's y + sin(angle) * ropeLength;

I can't really think of angular momentum right now though for swinging, and it might be difficult to create temporary anchor points for when the rope wraps around the landscape, but this should be a good start for the bazooka physics at least.

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

en kerro



Registered
  21/10/2004
Points
  578
2nd December, 2005 at 13:40:06 -

Thanks noyb. I'll try...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
3rd December, 2005 at 07:59:40 -

how i can make that cos thing? the Games Factory doesn't accept it.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
3rd December, 2005 at 13:15:51 -

I now got it, but it still doesn't work: Bazooka always shoots to same direction...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
3rd December, 2005 at 15:47:27 -

Do you have events which change the angle?

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

en kerro



Registered
  21/10/2004
Points
  578
4th December, 2005 at 08:52:06 -

I have tried to make it but I have failed... when I at last made it, the bazooka power didn't work... It always shot the bullet at same speed!

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Wicked Studios



Registered
  25/10/2004
Points
  460
7th December, 2005 at 19:26:11 -

I may figure out how to make a bazooka, but It'll have to be when I've got some time, busy with other projects right now. Hope I will be able to help, and btw i think my friend may have mentioned figuring this out, I'll see what he has to say.

 
"Actually sir, we found a tiny unicorn in your exhaust. It was jumping around poking holes in your gas tank." "Oh thank you I did not know that. A tiny unicorn? Wow."
   

Post Reply



 



Advertisement

Worth A Click