Posted By
|
Message
|
Dave Matthew (Jester Gaming)
Registered 09/07/2004
Points 148
|
23rd March, 2005 at 13:22:27 -
The problem:
I have say five moving platforms, and attached to a moving platform there should be two active objects, serving as "ledge-grab-obejcts" which you can grab. To make those grab-objects follow the moving platforms I spread a number in all moving platforms (used as identification) and then, if a grab-object is overlapping the moving platform I know they should be connected to each other, so I set the grab-objects value "connectedTo" to the ID of the platform it is overlapping. So now, each platform has an ID and all grab-objects has a value which says which platform it is connected to.
Each platform has a value xMove which tells the platform how many pixels it will move each 1/100 second.
Like, if xMove == 1 the platform will move one pixel to the right.
Then I check this event every 1/100 seconds:
if grab-object is overlapping moving platform and ID(moving platform) == connectedTo(grab-object) then:
set X(grab-object) to X(grab-object) + xMove(moving platform)
However, this does not work. The grab-objects move but they don't stay attached to the right platform. How can this happen?
Thanks
/Mattias
n/a
|
Noyb
Registered 31/05/2004
Points 1117
|
23rd March, 2005 at 13:58:09 -
http://www.create-games.com/article.asp?id=1082 :Janis Stoppe's excellent article about getting MMF to recognize different instances of objects of the same type.
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames
|
Dave Matthew (Jester Gaming)
Registered 09/07/2004
Points 148
|
23rd March, 2005 at 14:43:12 -
yeah, but the problem is that I have to keep track of two objects, not only one. only one grabber should move according to only one platform
n/a
|
|
|