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

Post Reply  Post Oekaki 

Posted By Message


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.



Evil Faker

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.

*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!!!


Master of all things Klik


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


Assault Andy

I make other people create vaporware


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:
Also creator of ZDay20 and Dungeon Dash.

Arf :: FPP Games

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.


Post Reply



Worth A Click