The Daily Click ::. Forums ::. Klik Coding Help ::. Blackholes
 

Post Reply  Post Oekaki 
 

Posted By Message

Blackstorm



Registered
  29/08/2002
Points
  439
26th July, 2004 at 22:46:55 -

I am making a game (Who isn't?) of which needs objects to be sucked to one location. (For the game, I need people to be sucked towards a bullet. Crazy, yes, but it is a strange game...)
If someone could post an example, that would be helpful... Or if you could just e-mail one to me at blackstorm12@yahoo.com.
I could also understand from a forum post, but an example would be more helpful.
Thanks!

 
Wise sayings:
"A pint of example is worth a gallon of advice."
"Do unto others as you want done unto you."
"An idea is nothing without effort."
"HOLY CRAP!"

Blackstorm



Registered
  29/08/2002
Points
  439
27th July, 2004 at 12:56:46 -

Does anyone understand what I am asking for?

 
Wise sayings:
"A pint of example is worth a gallon of advice."
"Do unto others as you want done unto you."
"An idea is nothing without effort."
"HOLY CRAP!"

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48488

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
27th July, 2004 at 13:31:50 -

Yes, its quite simple to do. Simply give the people ball movement, and make an event which makes them look in the direction of the bullet. Of course, their speed needs to be more than 0

 
n/a

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
27th July, 2004 at 14:31:45 -

I have a homing missile engine that might be useful to you:
http://www.fpp-games.com/tutorials/homing_missile.php

 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
27th July, 2004 at 15:08:54 -

Use the Movement object: it comes with examples like this

 
gone fishin'

Blackstorm



Registered
  29/08/2002
Points
  439
27th July, 2004 at 19:28:08 -

No, no, no...
The thing being sucked towards the bullet is going to be able to move as well. Otherwise, I wouldn't have needed help. This is going to be an online game, and the people can move around as they are being sucked towards the bullet.

What movement object are you talking about? Platform Movement object?

Image Edited by the Author.

 
Wise sayings:
"A pint of example is worth a gallon of advice."
"Do unto others as you want done unto you."
"An idea is nothing without effort."
"HOLY CRAP!"

Kirby Smith

Resident Slacker

Registered
  18/05/2003
Points
  479

VIP Member360 OwnerWii OwnerThe Cake is a Lie
27th July, 2004 at 20:37:51 -

Create a custom movement engine, then calculate the angle of the bullet object from the player using trig. Then, when you calculate the movement each loop, add in values for the direction of the bullet object as well as the intensity of the pull before you actually move the player sprite.

 
XBL Gamertag: Rampant Mjolnir

Blackstorm



Registered
  29/08/2002
Points
  439
27th July, 2004 at 20:55:10 -

That sounds like it would work, though my lowly mind cannot comprehend all that data... In other words, I don't know trig yet.

 
Wise sayings:
"A pint of example is worth a gallon of advice."
"Do unto others as you want done unto you."
"An idea is nothing without effort."
"HOLY CRAP!"

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
27th July, 2004 at 20:57:37 -

Black holes suck, use a magnet instead

 
n/a

Blackstorm



Registered
  29/08/2002
Points
  439
27th July, 2004 at 21:22:01 -

Alright then, how do I make a magnet? They both work close enough to the same way...

 
Wise sayings:
"A pint of example is worth a gallon of advice."
"Do unto others as you want done unto you."
"An idea is nothing without effort."
"HOLY CRAP!"

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!
28th July, 2004 at 02:05:04 -

X position of subject < X position of black hole
-X(subject)=X(subject)+1

X position of subject > X position of black hole
-X(subject)=X(subject)- 1

Y position of subject < Y position of black hole
-Y(subject)=Y(subject)+1

Y position of subject < Y position of black hole
-Y(subject)=Y(subject)+1

If you want the objects to be pulled towards the hole faster or slower depending how far away they are from it, have the events trigger a loop which moves the object. Trigger the loop (scaledmax - distance/scale) times, where scale is just an arbitrary divisor, and the scaled max is the maximum distance an object can be from the hole to be affected by it, pre-divided by the scale.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click