Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Need help in GM, with the "transforming"
United States
Torkirby
  Posted: Jun 9 2008, 05:39 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 33
Member No.: 4732
Joined: 17-November 07

Status: (0d) [--]


Alright, remember how in the Mario games when you get hit or get a powerup, everything stops and there's a little "transformation" sequence that shows the Mario is either getting hit or growing? I dunno if this makes sense to you, but I need help programming that into GM. Could anyone help?

Excuse me for my edit, but there's one more thing I need help with. When Mario is sliding/skidding, there's a little dust cloud near his feet. How would I program that?

This post has been edited by Torkirby on Jun 9 2008, 05:43 PM


--------------------
Pokemon Diamond friend code: Lukas: 4639-5474-5171

deviantART account: [http://torkirby.deviantart.com/]
PMEmail PosterUsers Website
Top
United States
OniLink10
Posted: Jun 9 2008, 07:02 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


I dunno how to program Power Up/Down Sequence, but for the Dust, make a Variable called "skid"(Without Quotes)and make skid set to 0 when not skidding, and in the step event, put a check to see if he is skidding, and if he is, skid=1, and if skid=1, create object of obj_skid(just an Object with the Dust sprite that destroys itself after a while) at position self.x and self.y.


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
Torkirby
Posted: Jun 9 2008, 08:10 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 33
Member No.: 4732
Joined: 17-November 07

Status: (0d) [--]


Ok, well my game uses all codes and not drag and drop, so how would I code it?


--------------------
Pokemon Diamond friend code: Lukas: 4639-5474-5171

deviantART account: [http://torkirby.deviantart.com/]
PMEmail PosterUsers Website
Top
Unspecified
Miaxis
Posted: Jun 10 2008, 01:32 AM
Quote Post


hagan bromas
[*]

Group Icon
Group: Members
Posts: 1799
Member No.: 2793
Joined: 12-October 06

Status: (0d) [--]


Latia to the rescue.
Add to step event:
if hspeed<0 and keyboard_check(vk_right) or hspeed>0 and keyboard_check(vk_left)
skid=1
else
skid=0

For the powerup/down sequence:
Collision Event with Powerup:
alarm[0]=5(use another alarm if you already used this one)

Alarm 0 Event
sprite_index=(mario´s small sprite)
transf+=1
if transf<8
alarm[1]=5
else
transf=0

Alarm 1 Event
sprite_index=(mario´s big sprite)
transf+=1
alarm[0]=5

For more transformations,just make a variable to what mario will transform to and set the variable conditions around the transforming.


--------------------
user posted image

user posted imageuser posted imageuser posted imageuser posted image
PMEmail PosterUsers WebsiteMSN
Top
United States
Torkirby
Posted: Jun 10 2008, 10:43 AM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 33
Member No.: 4732
Joined: 17-November 07

Status: (0d) [--]


So, I make an object called Powerup, and make a collision event for it?

Excuse me for my edit again, but I have a sprite called spr_dust to go with the skidding, how would I put that in?

This post has been edited by Torkirby on Jun 10 2008, 10:47 AM


--------------------
Pokemon Diamond friend code: Lukas: 4639-5474-5171

deviantART account: [http://torkirby.deviantart.com/]
PMEmail PosterUsers Website
Top
United States
Ianprime0509
  Posted: Jun 10 2008, 03:36 PM
Quote Post


My favorite E3 game so far
[*][*]

Group Icon
Group: Members
Posts: 488
Member No.: 3316
Joined: 17-February 07

Status: (0d) [--]


For the dust, put a Code action in the Step event(for mario) and use this code:
CODE

if skid = 1
{
instance_create(x,y+(mario's height - dust sprite's height),obj_dust)
}

And make sure you set an alarm in the Dust object to make it destroy after a while(maybe 3 steps or something)


--------------------

user posted imageuser posted imageuser posted image
Signature version 3.0
PMEmail Poster
Top
Unspecified
Miaxis
Posted: Jun 10 2008, 03:40 PM
Quote Post


hagan bromas
[*]

Group Icon
Group: Members
Posts: 1799
Member No.: 2793
Joined: 12-October 06

Status: (0d) [--]


QUOTE (Torkirby @ Jun 10 2008, 05:43 PM)
So, I make an object called Powerup, and make a collision event for it?

Yes. You can Name it however you want, of course. For powering down or getting hurt by an enemy, just reverse the whole thing.(like setting the form variable down)


--------------------
user posted image

user posted imageuser posted imageuser posted imageuser posted image
PMEmail PosterUsers WebsiteMSN
Top
United States
Torkirby
Posted: Jun 10 2008, 05:40 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 33
Member No.: 4732
Joined: 17-November 07

Status: (0d) [--]


...and the collision with the powerup/powerdown is for who?


--------------------
Pokemon Diamond friend code: Lukas: 4639-5474-5171

deviantART account: [http://torkirby.deviantart.com/]
PMEmail PosterUsers Website
Top
Unspecified
Miaxis
Posted: Jun 11 2008, 12:10 AM
Quote Post


hagan bromas
[*]

Group Icon
Group: Members
Posts: 1799
Member No.: 2793
Joined: 12-October 06

Status: (0d) [--]


Mario´s object.


--------------------
user posted image

user posted imageuser posted imageuser posted imageuser posted image
PMEmail PosterUsers WebsiteMSN
Top
Spain
Sergeant DeeY
Posted: Jun 11 2008, 12:19 AM
Quote Post


~Heh Heh~
[*][*][*]

Group Icon
Group: Members
Posts: 1344
Member No.: 4730
Joined: 17-November 07

Status: (0d) [--]


Ask Noone, he made an example for growing/shrinking


--------------------
The signature will not be available when the new forums shows up.
~~DeeY~~
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0561 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.13 ]