The Daily Click ::. Forums ::. Klik Coding Help ::. Custom Platform movement?
 

Post Reply  Post Oekaki 
 

Posted By Message

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
9th August, 2005 at 17:10:56 -

Does anybody know how I can make a custom platform movement in TGF?

 
Image
http://www.kevinhaag.ca

hishnak



Registered
  18/04/2004
Points
  994
9th August, 2005 at 20:06:50 -

Oh goodness how many times must people ask this question...

Okay, you must have detectors...Right, Left, Top, Bottom.
Set these to be always positioned reletive to the object.

Next you need two counters. One called X and the other Called y

Go into the event editor and here's some simple gravity

Always----Set X to X of player+ Counter X
Always----Set Y to Y of player+ Counter Y/5
Run this event once-----Set Y to Y of player+ Counter Y*5

Basicly you just manipulate the counter values to move the player. Here's an example of what you might try

When moved right and Right detector is not on overlaping a backdrop------Set Counter X to 3

Upon not moving right-----Set Counter X to 0

That just the basics. For jumping you could do...

When down detector is not over an obstacle background always-----Add 1 to counter Y (The Y axis in TGF is inversed)

Upon pressing shift----set Counter Y to -20

 
I'm feeling a bit wella

hishnak



Registered
  18/04/2004
Points
  994
9th August, 2005 at 20:12:05 -

Oh man, Something weird happened and my post appeared twice...Sorry for the double post.

Image Edited by the Author.

 
I'm feeling a bit wella

hop



Registered
  16/03/2005
Points
  916
9th August, 2005 at 22:01:31 -

Detectors are not required actually. It's hard to explain so I'll just post a simple example soon.

EDIT: Oh, I forgot that TGF doesn't have the fastloop fuction in the way that MMF does... Well I'll post an MMF example anyway.

Image Edited by the Author.

 
Working On:
Psydude
Castle Wars(working title)

XBLGT: sunstrike9

hop



Registered
  16/03/2005
Points
  916
9th August, 2005 at 22:40:23 -

Here's the MMF example, there's also the exe so anyone can view it if they want.

http://www.sitesled.com/members/fusiongames/CPM.zip

It's 303 kb btw.

 
Working On:
Psydude
Castle Wars(working title)

XBLGT: sunstrike9

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
10th August, 2005 at 07:24:45 -

Thats not very usefull for this guy is it?

It takes time to learn to make a good custom movement but it's basically about using only events to move your character around.

for instance,

repeat while left is pressed - set active object 1's x relative to it's x - 1

(that would move it slowly left, change that to -2 of copy the event for faster movement)

 
.

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
10th August, 2005 at 10:28:50 -

You don't need counters either. You can use active object alterable values.

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

hishnak



Registered
  18/04/2004
Points
  994
10th August, 2005 at 12:59:30 -

Yea, I know about All that stuff guys. He is using tgf not mmf.

Phizzy: If I had said alterable values someone would say "use counters"

 
I'm feeling a bit wella

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
10th August, 2005 at 14:56:00 -

Perhaps someone should point out a tutorial for him?
That's what should help. I did a quick search, but of course you can search for yourself.
http://www.create-games.com/cs_search.asp?sar=on&q=custom+platform+movement

The basic of a custom platform movement is that you try to move your character by manipulating the x and y coordinates. Like:
player pressed right -> x coordinate = x coordinate + 1
player pressed left -. x coordinate = x coordinate - 1

Start with little examples like these, use a square block a character and add all the difficult stuf, like jumping later.

Hope this helps you a bit.


 
Image jenswa.neocities.org

hishnak



Registered
  18/04/2004
Points
  994
12th August, 2005 at 08:17:22 -

Okay, Sorry Phizzy...Phrizzy! whats your stinkin problem. Change your name back or I'll tell my big brother.

 
I'm feeling a bit wella

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
12th August, 2005 at 08:28:53 -

Back to the topic, please!

Try this link for various tutorials:

www.create-games.com/cs_search.asp?q=custom+platform+engine&sar=on

EDIT: Whoops, didn't see someone already posted that

Image Edited by the Author.

 
n/a

Chamzel



Registered
  02/07/2002
Points
  352
20th August, 2005 at 20:04:25 -

Custom Platform Engines must really hate me. To make a great platform game and have it ultimately fail because I'm using the built in one would be a shame. However, I've tried a few custom platform engine tutorials that say either "Copy my code and use it for yourself" or have step by step coding instructions, but it never seems to work for me. In the end its usually that when I direct MMF to one object it for some reason thinks I'm pointing to another one, or the movement controls are mysteriously backwards, even in the tutorial. Or the tutorial says to do something that they never mentioned in the preparation text, so I'm not sure if I should make assumptions as to what they're talking about. Some tutorials are applauded and even Clickteam awarded tutorials. But they still seem backward and just not right!

The tutorial I'm currently looking off of is http://www.clickteam.info/kb/start/index.php?showtopic=315



 
CRUSH!!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
21st August, 2005 at 13:27:37 -

or you can click on my name and download the TGF CPM that I made.

 
Craps, I'm an old man!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
31st August, 2005 at 10:29:10 -

heh

Image Edited by the Author.

 
n/a

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
31st August, 2005 at 10:43:44 -

Very nice, aggggge. Very nice. I had even logged out and still it worked o_O

Image Edited by the Author.

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

Dave Matthew (Jester Gaming)



Registered
  09/07/2004
Points
  148
1st September, 2005 at 11:22:37 -

there is now functional difference between a counter and an alterable value anyway is it? a counter can hold a value and it is alterable right?

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
25th January, 2006 at 19:00:19 -

Execuse me. I did that by mistake.

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click