Clothes jump work around
Posted by frankiewhelan on 2012-02-20 19:43
Ok, here's how I think we can do the clothesline...
1. Create a new object "obj_clothes_solid" with a plain sprite the same width as the clothes' masks.
2. In the parent objects of the clothes "obj_clothesLine_down" etc.
Create a step / step event.
Use "If there is an object at a position" command. Object is "obj_character", x = 0, y = 0, relative.
Execute piece of code..
instance_create(obj_clothesLine_down.x, obj_clothesLine_down.y+32, obj_clothes_solid);
Then insert an ELSE
Use destroy instance > obj_clothes_solid.
So this will create a solid platform at the base of the clothes, so the cat can jump, but will also destroy the platform if the cat moves on.
Not perfect, but I haven't come up with anything else.
1. Create a new object "obj_clothes_solid" with a plain sprite the same width as the clothes' masks.
2. In the parent objects of the clothes "obj_clothesLine_down" etc.
Create a step / step event.
Use "If there is an object at a position" command. Object is "obj_character", x = 0, y = 0, relative.
Execute piece of code..
instance_create(obj_clothesLine_down.x, obj_clothesLine_down.y+32, obj_clothes_solid);
Then insert an ELSE
Use destroy instance > obj_clothes_solid.
So this will create a solid platform at the base of the clothes, so the cat can jump, but will also destroy the platform if the cat moves on.
Not perfect, but I haven't come up with anything else.
Home / Developer API / Tour / Get a Project - Solutions for Bug & Issue Tracking, Collaboration Tools, Subversion Hosting, Git Hosting
Alleycat_dt540_2012 is powered by Assembla.
1 Comments
By frankiewhelan on 2012-02-20 20:35
Ok, in the actual room this goes a bit weird.
When I applied it to one object in a test room, it worked perfectly.
Then I applied it to the parent of the up, middle and down classes. The result is pretty unpredictable, with the character disappearing or flying off the screen. I might try applying it to each individual object and see what happens. Time consuming, but at this stage I just want this working.