The Daily Click ::. Forums ::. General Chat ::. does any body know how to make a platform move?
 

Post Reply  Post Oekaki 
 

Posted By Message

Xekt

You can't have stars without Tronoa

Registered
  01/07/2007
Points
  102
15th July, 2007 at 10:34:52 -

please if do tell me?

 
www.PengForum.co.nr
For CP Fans!

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
15th July, 2007 at 11:08:20 -

http://www.create-games.com/cs_search.asp?q=moving+platforms&sar=on

This should be in the 'code-it' forum really

 
http://www.SilverNova.co.uk


Xekt

You can't have stars without Tronoa

Registered
  01/07/2007
Points
  102
15th July, 2007 at 11:21:14 -

thanx SilverNova Games

 
www.PengForum.co.nr
For CP Fans!

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
15th July, 2007 at 12:10:12 -

No problem

 
http://www.SilverNova.co.uk


Xekt

You can't have stars without Tronoa

Registered
  01/07/2007
Points
  102
15th July, 2007 at 17:34:51 -

what does X Pos = X Pos + 3 mean?

 
www.PengForum.co.nr
For CP Fans!

Deleted User
15th July, 2007 at 17:38:33 -

Make your platform an active object, then under its events in the event editor, set its X Position to X("Moving Platform") + 3

 

Xekt

You can't have stars without Tronoa

Registered
  01/07/2007
Points
  102
15th July, 2007 at 17:44:00 -

can you do this in tgf?

 
www.PengForum.co.nr
For CP Fans!

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
16th July, 2007 at 02:56:06 -

Yes. You select your platform as an active and say (for example)

if flag 0 is off ->
Set X Position of "Platform" to X("Platform")+3

if flag 0 is on ->
Set X Position of "Platform" to X("Platform")-3

"Platform" collides with backdrop ->
Toggle flag 0

(I'm pretty sure TGF has flags doesn't it?)

If not Set X Position of "Platform" to X("Platform")+3 should suffice.

 
Image
http://bfollington.tumblr.com

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th July, 2007 at 05:06:01 -

You can use the X/Y positions functions to modify any object. Bear in mind that the origin (the point x=0, y=0) will be found in the top left corner of the frame. The X will proceed from left to right, and Y from top to bottom. In normal cartesian coordinates it would have an inverted Y axis. So this might seem odd at first.

When you are in the expression editor (what pops up when you access the "Set X position" command), you can use the "retrieve data from an object" button to access a list of objects. Click on your platform, and you can retrieve its current X position.


Your biggest problem, however, will be that while the platform can move all it wants, your player will not go with it. It will slide to the right and the player will simply fall off of it. To counteract this, you can create a small object, which you use the "Set x position" command set to just below your characters feet. Then, add an event saying "If this new detector object is overlapping a platform, set your characters X position to his X position + 3. This way your character will move along with the platform.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
16th July, 2007 at 06:16:57 -

Listen to Pixeltheif.

 
Image
http://bfollington.tumblr.com

Xekt

You can't have stars without Tronoa

Registered
  01/07/2007
Points
  102
16th July, 2007 at 10:35:31 -

i still dont get it does any one have an engine

and i tried to make the character stop on the platform but i cant

 
www.PengForum.co.nr
For CP Fans!

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
16th July, 2007 at 12:08:55 -

You can use the X/Y positions functions to modify any object. Bear in mind that the origin (the point x=0, y=0) will be found in the top left corner of the frame. The X will proceed from left to right, and Y from top to bottom. In normal cartesian coordinates it would have an inverted Y axis. So this might seem odd at first.

It's because a CRT draws the lines from the top downwards. Thus Line 1 is the first drawn, followed by line 2 and so on.

Anyway, do you use a custom engine or the default platform movement? If the latter, then you should make the active stop on collision with the platform (it was a while since I used the built in platform movement though...). If you have a custom engine (recommended) add a negated "while player is overlapping platform" to the "gravity event" or something (depends on how your engine is written). However this will not make the character follow the platform! The unprofessional method I used in my earliest games (because I used the built-in path movement) was to set the X,Y of the player according to the positions of the platform. A more professional way is to move the platform and player in the same event

+While Player is overlapping platform
-Set X Player to X Player +1
-Set X Platform to X Platform +1

This will make the player and platform move to the right while the player is on the platform. However, the platform will be still while the player is not on it.

+NOT While Player is overlapping platform
-Set X Platform to X Platform +1

Now this will make the platform move when the player is not on it. However it still only moves to the right. You can use an alterable value to determine which way it should move, like this

+While Player is overlapping platform
AND Alterable Value A of platform is 1
-Set X Player to X Player +1
-Set X Platform to X Platform +1

+While Player is overlapping platform
AND Alterable Value A of platform is 2
-Set X Player to X Player -1
-Set X Platform to X Platform -1

And so on...

 
- 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

Billybobjoe198



Registered
  12/01/2007
Points
  221
16th July, 2007 at 12:56:52 -

._. I don;t use TGF but in MMF it's a breeze. I don't see why you asked....

 
n/a

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
16th July, 2007 at 16:19:27 -

Just because YOU might be able to do it, doesn't mean everyone can. After all, we're not born knowing this stuff, we have to learn or ask advice.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click