The RPG Maker Resource Kit
Other Game Creation => Other Game Making Programs => Topic started by: J-Crew on August 16, 2007, 08:51:36 PM
-
Does anyone know how I'd go about having a player be able to use items like in Super Smash Bros. where you can pick them up and throw them in different directions, without having to make a different sprites for a character with every item. Thanks ahead of time.
-
Yes, but I dunno if you could get the bob effect that they have while they're holding it. You would just make it so like...
Say you're player was a square, 32x32. You want to make it so the player can pick up an item, and then carry it around. First, you pick a point. Since it's a featureless square, we'll just make it follow the center.
You'd make it so when button _______ is pressed you activate a variable in the item you're picking up. When that variable is active, it follows the position you decided on. Our position is te center of a 32x32 square, so it would go like this:
player.x+16
player.y+16
NOT RELATIVE
These would go in a 'move to position' action inside the object's step event.
-
Somewhere on the GMC is a tutorial for picking up and carrying objects...
nvm the somewhere, I just found it:
http://gmc.yoyogames.com/index.php?showtopic=265987&hl=
look around on there.
-
Yeah I had already figured that part out...I guess I wasn't very specific. sorry...but I have that part down, but I did it in GML. I put if "if self.grabbed = 1 {self.x = Player_1.x self.y = Player_1.y}" But the problem is, is when the player goes to pick it up. I have " if collision_point(x,y,Item,false,false) {Item.grabbed = 1} ". This picks up every instance of the object "Item" thats on screen. I know this is because I put "Item.grabbed = 1" rather than "other.grabbed = 1" But when I try that it doesn't pick it up. Thanks for your help so far. I know I wasn't specific enough. :-\
Edit:Oh thanks icefllame. I'll check it out to see if it's what I'm looking for.
-
find it useful? If not you could always PM one of the GM mentors, their links can be found in the Pins under Novice Q&A on the GMC forums.
-
Yeah it helped alot, sorry I didn't reply sooner. I was busy.