MFGG Forums
  • Home
  • Members
  • Help
  • Search
MFGG Main Site MFGG Forums MFGG Developer Discussion v
« Previous 1 … 11 12 13 14 15 16 Next »
Little help?
MFGG Forums MFGG Developer Discussion v
« Previous 1 … 11 12 13 14 15 16 Next »
Little help?
MFGG Forums MFGG Developer Discussion v
« Previous 1 … 11 12 13 14 15 16 Next »
Little help?
Mark All Posts Read Today's Posts

Little help?
WWpl4y3r
Koopa
Members
#1
05-03-2018, 03:10 PM
So... I'm making a game on GM:Studio, and... Let's just skip to the point. I want to make an object, a training weight(one of those oversized, cartoonish ones) so that when they fall, if you stand in the middle of the weights, they'll do you no harm, but actually damage you if you're under either side. How do you edit the mask so that happens? Is it possible?

  ↳
LGBTQ+ Pride Pedigree
Resident Furry Degenerate
Members
Big Help Submitter Super Submitter Super Reviewer Iso Collab Contributor (3) Sprite Comp Winner Sprite Comp Top 5 Minigame Comp Winner (2) Drawing Comp Runner-Up Drawing Comp Top 5 Skull Badge (2) Secret Santa (2) Holiday Tree Good Citizen MFGG 17th Anniversary MFGG 18th Anniversary MFGG 19th Anniversary Ye Olde MFGGe Retro Game Jam Participant MFGG Awards 2017 Winner
#2
05-03-2018, 08:03 PM (This post was last modified: 05-03-2018, 08:04 PM by Pedigree.)
You could create invisible mask objects to handle the collisions separately like obj_weightcol_L and obj_weightcol_R and set their x and y accordingly in a Step event, perhaps.

The issue would be if you had more than one weight at a time on screen, though, and there's probably an easier way to handle this.
 
[-] The following 2 users Like Pedigree's post:2 users Like Pedigree's post
  ↳ Spritanium, WWpl4y3r
United States VinnyVideo
Can't have an avatar without a Shy-Guy
Site Developer
Main Site Moderator Site Developer/Webmasters Wiki SysOp Big Help Submitter Super Reviewer (2) Wiki Contributor Sprite Comp Runner-Up Minigame Comp Winner Minigame Comp Runner-Up Minigame Comp Top 5 (3) Music Comp Winner Music Comp Runner-Up Music Comp Top 5 (2) Drawing Comp Top 5 Game of the Month Winner NCFC Contributor (4) Secret Santa (5) MFGG 17th Anniversary MFGG 18th Anniversary MFGG 19th Anniversary Ye Olde MFGGe Retro Game Jam Participant MFGG Awards 2010 Winner MFGG Awards 2011 Winner MFGG Awards 2012 Winner MFGG Awards 2013 Winner MFGG Awards 2014 Winner MFGG Awards 2015 Winner MFGG Awards 2017 Winner (3) MFGG Awards 2019 Winner MFGG Awards 2024 Winner
#3
05-03-2018, 09:34 PM (This post was last modified: 05-03-2018, 09:35 PM by VinnyVideo.)
Pedigree's method would be a good way to do it. You could actually make it so you could place as many dumbbells in the room as needed.

Here's what I would do:
  • First, I would create a "bar" object. This is the object that you'd actually place in the room. It wouldn't have a collision event with the player.
  • I would also create a "weight" object. This is the object that would actually hurt the player, so you'd need to put something in the relevant collision events.
  • In the bar object's Create event, you'd create two weights. (This is the GM 8 syntax, but GM Studio 2's is pretty similar):

Code:
leftWeight = instance_create(x-32, y, obj_weight);
rightWeight = instance_create(x+32, y, obj_weight);

In the bar's Step event, you'd make sure that the leftWeight and rightWeight instances move at the same speed as the main object.

Does this make sense?
Course clear! You got a card.

[Image: CourseClear.gif]

[-] The following 2 users Like VinnyVideo's post:2 users Like VinnyVideo's post
  ↳ Pedigree, WWpl4y3r
WWpl4y3r
Koopa
Members
#4
05-05-2018, 10:01 PM
Both ideas seem to be good to go. I'll try them out once the time comes 'round to do those weights.

About Pedigree's idea, well, I actually intended on having multiple weights at the same room.

And about Vinny's, guess I should make the handlebar and the weights have the same hitbox then, at least same-sized so the bar doesn't fall very far from the middle of the group when they hit the floor.

Thank you very, very much. You helped a lot, seriously. Other Big Brin
[-] The following 1 user Likes WWpl4y3r's post:1 user Likes WWpl4y3r's post
  ↳ Pedigree
WWpl4y3r
Koopa
Members
#5
05-23-2018, 10:41 AM
I hate doubleposting, but... Another little doubt here.

Someone told me earlier I shouldn't use PRECISE masking for the player - For it would screw the base code entirely.

But how about, say... In Tetris-themed "wall" objects? Should I make it precise? Won't be for the player, but I feel like making it create multiple little block masks out of spite would be overreaching on this one.

And yes, it's for the same project, on a different level.

  ↳
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
Forum Jump:

Mario Fan Games Galaxy - Powered by MyBB | MFGG Staff | Contact Us

Linear Mode
Threaded Mode