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?
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
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
Little help? - by WWpl4y3r - 05-03-2018, 03:10 PM
RE: Little help? - by Pedigree - 05-03-2018, 08:03 PM
RE: Little help? - by VinnyVideo - 05-03-2018, 09:34 PM
RE: Little help? - by WWpl4y3r - 05-05-2018, 10:01 PM
RE: Little help? - by WWpl4y3r - 05-23-2018, 10:41 AM

  • View a Printable Version
Forum Jump:

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

Linear Mode
Threaded Mode