MFGG Forums
How can I make a Cape power-up from SMW? - Printable Version

+- MFGG Forums (https://forums.mfgg.net)
+-- Forum: MFGG (https://forums.mfgg.net/forumdisplay.php?fid=4)
+--- Forum: Developer Discussion (https://forums.mfgg.net/forumdisplay.php?fid=10)
+--- Thread: How can I make a Cape power-up from SMW? (/showthread.php?tid=2387)

Pages: 1 2


How can I make a Cape power-up from SMW? - goh - 05-16-2020

I want to make a cape powerup from Super Mario World for my fanmade Hello Mario engine game. I already made a fire raccoon power-up and a flying power-up but I don't even know how to do the cape powerup. Can someone help me please?

I'm using Game Maker Studio 1.4 btw.


RE: How can I make a Cape power-up from SMW? - Metallica Lover - 05-17-2020

https://www.youtube.com/results?search_query=Game+Maker+Language+Super+Mario+World both can and will help you out. My name is Jason.


RE: How can I make a Cape power-up from SMW? - goh - 05-17-2020

It doesn't focus on the making of the Cape power-up though.


RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-17-2020

This is going to be very, very complicated. You should know exactly how the cape powerup works in SMW. I think you should get the cape animation working first. Then, the "slow fall" ability, which is similar to the raccoon leaf's. Put this code in the end of Mario's main actions script: (which is Event User 2 in Hello Engine if I'm not mistaken)

if keyboard_check( [jump button here] )
and vspeed >= 0.5
{
vspeed = 0.5
}


RE: How can I make a Cape power-up from SMW? - Hyper - 05-17-2020

You can borrow some of the codes from my old SMW Game Maker 8 engine. However it's up to you to port all of the codes or make some edit yourself since my engine worked slightly different compared to Hello Mario Engine.
https://mfgg.net/index.php?act=resdb&param=02&c=4&id=27791

I can only provide some guide these days. I have a life, I am not as granted with time as of 10 years ago.


RE: How can I make a Cape power-up from SMW? - GeneSu730 - 05-17-2020

I can give you my cape power-up code but I am not so sure if you can integrate it into your code. I use Visual C++. If you use C++ as your language, I can send you a copy of my source code but if you are coding it in BASIC, you might have a problem. You will have to translate it.


RE: How can I make a Cape power-up from SMW? - Evan.F - 05-18-2020

(05-17-2020, 10:50 PM)GeneSu730 Wrote: I can give you my cape power-up code but I am not so sure if you can integrate it into your code. I use Visual C++. If you use C++ as your language, I can send you a copy of my source code but if you are coding it in BASIC, you might have a problem. You will have to translate it.

He's using Hello Mario engine (gamemaker) so no,


RE: How can I make a Cape power-up from SMW? - goh - 05-18-2020

(05-17-2020, 10:21 PM)SuperSledgeBro Wrote: This is going to be very, very complicated. You should know exactly how the cape powerup works in SMW. I think you should get the cape animation working first. Then, the "slow fall" ability, which is similar to the raccoon leaf's. Put this code in the end of Mario's main actions script: (which is Event User 2 in Hello Engine if I'm not mistaken)

if keyboard_check( [jump button here] )
and vspeed >= 0.5
{
vspeed = 0.5
}

Okay, then what?


RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-18-2020

Then, you'd have to make the flight ability, which is the most complicated part. The easier way is to make an object, call it "obj_mario_capefly", and have Mario turn into this object if he jumps when his P-Meter is full. You should open an emulator and load a SMW Rom and play with the cape feather to see exactly how it works. As far as I remember, when Mario is flying, if you press the arrow button opposite to Mario's direction, he flies higher, if you press in the direction he is going at, he falls faster and causes an earthquake when he hits the floor.

I can't give you a script for this now since I don't remember the variables Hello Engine has and I still use an old version of Game Maker. But, there is a modified engine called "Hello Engine 6 Fan-Made" which has the cape power-up, if you can find it you can copy and paste it into your game!


RE: How can I make a Cape power-up from SMW? - goh - 05-18-2020

(05-18-2020, 11:02 AM)SuperSledgeBro Wrote: Then, you'd have to make the flight ability, which is the most complicated part. The easier way is to make an object, call it "obj_mario_capefly", and have Mario turn into this object if he jumps when his P-Meter is full. You should open an emulator and load a SMW Rom and play with the cape feather to see exactly how it works. As far as I remember, when Mario is flying, if you press the arrow button opposite to Mario's direction, he flies higher, if you press in the direction he is going at, he falls faster and causes an earthquake when he hits the floor.

I can't give you a script for this now since I don't remember the variables Hello Engine has and I still use an old version of Game Maker. But, there is a modified engine called "Hello Engine 6 Fan-Made" which has the cape power-up, if you can find it you can copy and paste it into your game!

I tried creating the obj_cape animation. But suddenly happens to become this:
Code:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_capeanimation:

global variable name 'state' index (100229) not set before reading it.
at gml_Object_obj_capeanimation_DrawEvent_1 (line 1) - if global.state = cs_cape
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_capeanimation_DrawEvent_1 (line 1)



RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-18-2020

Did you set a value for variable "state" in the object's Create Event?


RE: How can I make a Cape power-up from SMW? - goh - 05-18-2020

Um, no.


RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-18-2020

Then do it and see what happens.


RE: How can I make a Cape power-up from SMW? - goh - 05-18-2020

(05-18-2020, 03:37 PM)SuperSledgeBro Wrote: Then do it and see what happens.

Will you explain this cause I tried the create event and it didn't work:
Code:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_capeanimation:

Unable to find any instance for object index '417' name 'obj_flyingmario'
at gml_Object_obj_capeanimation_DrawEvent_1 (line 2) - and (obj_flyingmario.sprite_index != spr_mario_cape_fly or not instance_exists(obj_flyingmario))
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_capeanimation_DrawEvent_1 (line 2)



RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-18-2020

Try changing:

"and (obj_flyingmario.sprite_index != spr_mario_cape_fly or not instance_exists(obj_flyingmario))"

into:

"and ((obj_flyingmario.sprite_index != spr_mario_cape_fly and instance_exists(obj_flyingmario)) or not instance_exists(obj_flyingmario))"


RE: How can I make a Cape power-up from SMW? - goh - 05-18-2020

(05-18-2020, 09:07 PM)SuperSledgeBro Wrote: Try changing:

"and (obj_flyingmario.sprite_index != spr_mario_cape_fly or not instance_exists(obj_flyingmario))"

into:

"and ((obj_flyingmario.sprite_index != spr_mario_cape_fly and instance_exists(obj_flyingmario)) or not instance_exists(obj_flyingmario))"

Nope, didn't work!

Code:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_capeanimation:

Unable to find any instance for object index '417' name 'obj_flyingmario'
at gml_Object_obj_capeanimation_DrawEvent_1 (line 2) - and ((obj_flyingmario.sprite_index != spr_mario_cape_fly and instance_exists(obj_flyingmario)) or not instance_exists(obj_flyingmario))
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_capeanimation_DrawEvent_1 (line 2)
I use Game Maker Studio 1.4!


RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-18-2020

Do you even have an object named "obj_flyingmario" in the objects list?


RE: How can I make a Cape power-up from SMW? - goh - 05-18-2020

(05-18-2020, 10:11 PM)SuperSledgeBro Wrote: Do you even have an object named "obj_flyingmario" in the objects list?

Yes!


RE: How can I make a Cape power-up from SMW? - SuperSledgeBro - 05-19-2020

Uh. I can't figure why you're getting this error. I don't use Game Maker Studio, so I think I can't help you any longer... Sad


RE: How can I make a Cape power-up from SMW? - goh - 05-19-2020

Well, I started over and suddenly happens to be that when I got the cape feather and error shows up:
Code:
############################################################################################ FATAL ERROR in action number 1 of Draw Event for object obj_capeanimation: Unable to find any instance for object index '416' name 'obj_flyingmario' at gml_Object_obj_capeanimation_DrawEvent_1 (line 2) - and instance_exists(obj_flyingmario.sprite_index = spr_mario_big_runjump or not instance_exists(obj_flyingmario)) ############################################################################################ -------------------------------------------------------------------------------------------- stack frame is gml_Object_obj_capeanimation_DrawEvent_1 (line 2)
Can anyone fix this, please?