(trash, do not read) - Printable Version +- MFGG Forums (https://forums.mfgg.net) +-- Forum: MFGG (https://forums.mfgg.net/forumdisplay.php?fid=4) +--- Forum: Developer Discussion (https://forums.mfgg.net/forumdisplay.php?fid=10) +--- Thread: (trash, do not read) (/showthread.php?tid=689) |
(trash, do not read) - mrpin355 - 03-31-2018 While this thread is active. I got a issue dealing with Wiggler's body parts, and I seriously want help, the fact that I tried many methods but it won't work and "Developer Discussion" is the least active thread of this site. The problem is that whenever it instantly moves horizontally 8 pixels, specifically, shifting itself while on the slopes it jumps *number depending how steep the slopes is* pixels up, I know why that happens, but I need a better method that solves this problem. Here is a screenshot visually portraying it: Wiggler is flashing Thanks. RE: Wiggler's body parts on slopes - Willsaber - 04-02-2018 Some more information would help in diagnosing the issue. What kind of collision checking are you using? RE: Wiggler's body parts on slopes - mrpin355 - 04-02-2018 (04-02-2018, 12:49 AM)Willsaber Wrote: Some more information would help in diagnosing the issue. What kind of collision checking are you using? I use collision_rectangle for these situations. RE: Wiggler's body parts on slopes - Hyper - 04-02-2018 Please post your codes here using Code: [code]//code here[ / code] (remove the spaces between "/") RE: Wiggler's body parts on slopes - mrpin355 - 04-02-2018 Before reading the code, It's a modified Hello's Wiggler object. I might hear I should make my own. Stun code Code: //Stop body parts Slope logic Code: //Embed into the slope to ensure correct slope mechanics When spawned Code: //Create anatomy If you need more, let me know. Anyone here? RE: Wiggler's body parts on slopes - mrpin355 - 04-06-2018 If the screenshot is not enough. Here is a .gif showing it on action! RE: Wiggler's body parts on slopes - Hyper - 04-07-2018 Comment out this in the stun code: Code: x = behind.x-offset*xscale; RE: Wiggler's body parts on slopes - mrpin355 - 04-07-2018 (04-07-2018, 03:15 PM)Hypernova Wrote: Comment out this in the stun code: It makes the body part snap to it's assigned behind body parts. Functions purpose is when it's stunned or when it makes a turn. 'offset' means the width of the body. RE: Wiggler's body parts on slopes - Hyper - 04-07-2018 You intended to make the Wiggler to shorten itself when hit, however the y position is not set during the processes. I would recommend to do this: Instead of: Code: //Snap the parts Do this Code: //Turn him into a "accordion"! RE: Wiggler's body parts on slopes - mrpin355 - 04-07-2018 (04-07-2018, 10:19 PM)Hypernova Wrote: Do this Thanks, but for some reason GameMaker reads it as 'Unexpected symbol'. RE: Wiggler's body parts on slopes - Hyper - 04-07-2018 Are you using Game Maker 8, Studio, or Studio 2? Is there a reference that points out the unexpected code error? RE: Wiggler's body parts on slopes - mrpin355 - 04-07-2018 (04-07-2018, 11:38 PM)Hypernova Wrote: Are you using Game Maker 8, Studio, or Studio 2? Is there a reference that points out the unexpected code error?I'm using Studio 1.4 and it doesn't point out why. RE: Wiggler's body parts on slopes - Hyper - 04-07-2018 Let's see if this helps: Change this: Code: until !(collision_rectangle(bbox_left,bbox_bottom-4,bbox_right,bbox_bottom-1,obj_slopeparent,1,0)) To this: Code: until (!collision_rectangle(bbox_left,bbox_bottom-4,bbox_right,bbox_bottom-1,obj_slopeparent,1,0)) RE: Wiggler's body parts on slopes - mrpin355 - 04-08-2018 (04-07-2018, 11:48 PM)Hypernova Wrote: Let's see if this helps: Unfortunately, it still doesn't work. I recommend you test it before you publish the code. If you want, I could PM and give you the object and diagnose it. RE: Wiggler's body parts on slopes - Hyper - 04-08-2018 I am currently using Game Maker: Studio 1.4.1804. I have tested out the code without any issues: Some older version of Game Maker Studio may have issues like this, please update the game engine and see if that helps. My end of result: Reference of do/until statement: https://docs.yoyogames.com/source/dadiospice/002_reference/001_gml%20language%20overview/401_10_do.html RE: Wiggler's body parts on slopes - mrpin355 - 04-08-2018 (04-08-2018, 12:38 AM)Hypernova Wrote: I am currently using Game Maker: Studio 1.4.1804. I have tested out the code without any issues:I'm using 1.4.1804 as well. Wtf is going on? Like, did I accidentally do a minor change? RE: Wiggler's body parts on slopes - Hyper - 04-08-2018 Clear its compiler cache and restart the program would be a typical solution in most cases. RE: Wiggler's body parts on slopes - mrpin355 - 04-08-2018 N/A (04-08-2018, 12:50 AM)Hypernova Wrote: Clear its compiler cache and restart the program would be a typical solution in most cases. Sorry for annoying you, but this time the problem is fixed! Thanks for helping! Topic disclosed. for now... RE: Wiggler's body parts on slopes - Hyper - 04-08-2018 Since I am not able to DM you (Error message: Existant has private messaging disabled. You cannot send private messages to this user.), I'll just post an alternative solution here: Code: if (collision_rectangle(bbox_left,bbox_bottom-4,bbox_right,bbox_bottom,obj_slopeparent,1,0)) RE: Wiggler's body parts on slopes - mrpin355 - 04-08-2018 (04-08-2018, 02:34 AM)Hypernova Wrote: Since I am not able to DM you (Error message: Existant has private messaging disabled. You cannot send private messages to this user.), I'll just post an alternative solution here: And this time it worked! Thanks for your big help! I was trying to fix that problem like in 2 months! |