The Daily Click ::. Forums ::. Klik Coding Help ::. Click and move movement
 

Post Reply  Post Oekaki 
 

Posted By Message

solonmonkey



Registered
  12/05/2004
Points
  165
26th July, 2004 at 10:41:13 -

I am working on a click and move RPG game and I was hoping somebody could explain to me how to make this kind of a movement using The Games Factory. I looked around and a couple and they were too confusing. Help would be greatly appreciated.

 
n/a

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
26th July, 2004 at 13:40:12 -

basically, the easiest way for you to do this, was when you clicked, set the position of an invisible object to X and Y of the mouse, then have the person (with ball movement) look in the direction of the object, then move. Then when he hits the detector, stop moving.

example:
*User Clicks

= Position (object): Set X to XMouse and Y to YMouse
= Character: Look in the direction of (0,0) from object. Start Movement.

*Character colides with object
= Character: Stop Movement.


Then just use the stop movement event for when the character colides with an obstacle

Image Edited by the Author.

 
My signature is never too big!!!

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
26th July, 2004 at 19:20:05 -

Personally I wouldn't do that as it's inaccurate, I would make my own movement:

User clicks ->
- Set player's value A to x-mouse
- Set player's value B to y-mouse

Then do events like this to move the person

Player's xpos is greater than value A ->
- Subtract from player's x-pos

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
28th July, 2004 at 07:05:07 -

Klikmaster - There's nothing really wrong with that, as long as you have a solid collision detection engine.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
28th July, 2004 at 17:22:44 -

That method won't move directly towards the target though KlikMaster, unless it's at some multiple of 45 from the player. For example, If you clicked 100 pixels right of the player but 200 pixels above it, then it would move diagonally for 141 pixels then go 100 pixels vertically upwards. A direction-based system will therefore look better. Best of all would be to have a decimally accurate 360 system, but that's probably not necessary.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click