I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: shissachan on July 08, 2014, 05:29:19 PM

Title: Platform Question
Post by: shissachan on July 08, 2014, 05:29:19 PM
I was wondering if there were neat tricks or some way to make a platform stay between a certain space. Something like a boundary so the platform knows where to collide with it and turn around to go the other direction. Anyone know what I should do for this?  :atkWut:
Title: Re: Platform Question
Post by: infern0man1 on July 08, 2014, 07:23:11 PM
Create an invisible object and have the platform reverse direction when it collides with the object.
Title: Re: Platform Question
Post by: shissachan on July 09, 2014, 01:00:26 AM
My platforms aren't moving at all actually. Anyone know why that might be the case? I made a new object and made the parent the moving platform, by the way.  :atkWut:
Title: Re: Platform Question
Post by: pieceofcheese87 on July 09, 2014, 01:16:59 AM
you can just put hspeed=___ or vspeed=____ in the instance creation code
Title: Re: Platform Question
Post by: shissachan on July 09, 2014, 02:46:39 AM
Oi vey. Thanks cheese. I used hs thinking it would work like the spikes but I'm dumb as usual.  :atkCry:

While I'm at it, how do I get the background to scroll on it's own even if the player is staying still? Like a visual kind of scrolling. These are what I currently have the background set to but it's just motionless.
(https://i.gyazo.com/b403a714d9aa8bb5851d8306f47dd13e.png)
Title: Re: Platform Question
Post by: vlhx on July 09, 2014, 10:25:44 AM
Oi vey. Thanks cheese. I used hs thinking it would work like the spikes but I'm dumb as usual.  :atkCry:

While I'm at it, how do I get the background to scroll on it's own even if the player is staying still? Like a visual kind of scrolling. These are what I currently have the background set to but it's just motionless.
(click to show/hide)

you probably have a duplicate background in background 1 which is currently blocking background 0 from showing, it should work fine once you have dealt with that
Title: Re: Platform Question
Post by: shissachan on July 09, 2014, 12:27:51 PM
Oi vey. Thanks cheese. I used hs thinking it would work like the spikes but I'm dumb as usual.  :atkCry:

While I'm at it, how do I get the background to scroll on it's own even if the player is staying still? Like a visual kind of scrolling. These are what I currently have the background set to but it's just motionless.
(click to show/hide)

you probably have a duplicate background in background 1 which is currently blocking background 0 from showing, it should work fine once you have dealt with that
I checked back to see if I did that but I actually didn't. I have a background image with a foreground. They appear fully stretched and clean together in game maker but when I test the game they end up looking like this without any motion.
(click to show/hide)
Title: Re: Platform Question
Post by: vlhx on July 09, 2014, 05:03:54 PM
I checked back to see if I did that but I actually didn't. I have a background image with a foreground. They appear fully stretched and clean together in game maker but when I test the game they end up looking like this without any motion.
(click to show/hide)

thats weird. im not experienced enough to say what could be wrong with it  :BibleThump: by my logic your background should be scrolling with given values on the first picture, atleast thats how it works for me if i boot up a fresh map and just add those same values in the background tab

you could try it on a new room just to see if you can get it working there, it might help you to figure out whats the actual problem with your current room
Title: Re: Platform Question
Post by: shissachan on July 10, 2014, 12:14:24 PM
Yeah I got it fixed. I had an object that was making the background follow the player which prevented it from moving. paraPalm