A Simple Point and Click Character Movement Thingy
Author: | - Yelnek -
|
Submitted: | 17th May, 2003
|
Views: | 5485
| Rated: |
|
|
Ok... so you want to make a Point and Click Adventure game and you don't know how to get the character moving properly...Now I use this because it is the best one I could find that will work goodly...(Hehe..I know goodly isen't a word and best of all..It is of my creation...I used Seph Idea..but I found it didn't always work..ok! So here it goes...
First off make a character that has a walking animation...Under CHARACTER MOVEMENT set this dudes movement to ~bounce ball~ and UN click the ~moving at start~ box...
Now you have a character who will follow you!!! well not really..but Im getting to that...
Also make a new active object called ARROW and set this movement to the MOUSE option.
Under the EVENT MANAGER set up a new event:
USER CLICKS WITH LEFT MOUSE BUTTON
Under your characters little picture place this code into the above event:
LOOK AT (0,0) FROM ARROW
movement=START
There..now your character will move but WHAT?!?!?! He won't stop!!! Thats ok..here is where my code changes from seph's... Seph had it so that when the CHARACTER collided with the ARROW the character would STOP... This caused a problem cause if the player moved the mouse away from that spot(don't forget the arrow is following the mouse) the Character would keep moving and wouldn't stop. My way has it so that even if the ARROW does move away, the character would still stop
Make a new active object and call it DOT..thats all it has to be is a small dot...
Place the below into the USER CLICKS WITH LEFT MOUSE BUTTON event:
Now under the DOT picture place:
SET POSITION AT (0,0) FROM ARROW
Under the EVENT MANAGER set up TWO new events:
WHEN "CHARACTER" IS OVERLAPPING "DOT"
and
START OF LEVEL
Under your characters little picture place this code into the first new event:
movement=STOP
Now place this other code underneth the DOT's picture ionto the second new code:
MAKE INVISIBLE
There you have it!!!
It should work perfectly for you!!! Also any comments, suggestions or better ways...please post
~Kenley
|
|
|