How do I Mario Powerups

Discussion and feedback on Construct 2

Post » Thu Jun 22, 2017 12:10 am

Hello! I'm new to Construct 2 and thought it would be fun to make an attempt at making a Mario game. Since I'm new, I've been using the free version, which limits me to 100 events. However, this is causing me to run into a problem. Currently, to animate Mario, it takes 34 events. However, Mario has multiple states he can be in, such as big, small, fire, or star. Each of these require different animation though. With my limited amount of events, I can't just duplicate the 34 events to make these different power up states. So, is there a potential workaround? Thanks in advance!
B
5
Posts: 5
Reputation: 235

Post » Thu Jun 22, 2017 7:32 am

there definitely is, but im curious as to how it takes you 34 events to animate mario. a screenshot would make this a little easier to answer. i feel maybe you are calling something else an event, but a lot of what you're asking can be done with a combination of global/instance variables and the set animation, or scale sprite options.
if you make a numeric global variable/instance variable called "State" you can say if state = 0 set animation to a, state = 1 set animation to b, etc. . if you post a screenshot of your events i can probably help you cut it down by a few lines of code. 34 sounds like way too much. ive made full platformers with less than that when my laptop worked.
B
25
S
14
G
1
Posts: 138
Reputation: 3,111

Post » Thu Jun 22, 2017 3:13 pm

Message: Nintend0Nerd can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I couldn't figure out how to upload a picture directly to the forum, so I just created a quick Google site and uploaded the picture there. The last bits of it get cut off, but they are essentially if A is down simulate jump, of left arrow is down simulate pressing left, and if right arrow is down simulate right. Again, since I'm new to all this, I started off using a tutorial. However, the tutorial didn't cover key features such as running, so I stopped using it. After that I just did stuff myself. It's probably really inefficient. It works however. I'm guessing I'll probably just start from scratch and make something that is more convenient.

Here's the site with the picture: https://sites.google.com/site/construct2help1/
B
5
Posts: 5
Reputation: 235

Post » Fri Jun 23, 2017 7:24 am

This forum required 500 reputation!!!
B
2
Posts: 3
Reputation: 156

Post » Fri Jun 23, 2017 7:50 am

ellenconnel wrote:This forum required 500 reputation!!!

@ellenconnel

Yes, and all your posts up to mow could be classed as spam.

Any more pointless posts and you are likely to be banned as a spammer.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,554
Reputation: 60,452

Post » Fri Jun 23, 2017 10:52 pm

Nintend0Nerd wrote:I couldn't figure out how to upload a picture directly to the forum, so I just created a quick Google site and uploaded the picture there. The last bits of it get cut off, but they are essentially if A is down simulate jump, of left arrow is down simulate pressing left, and if right arrow is down simulate right. Again, since I'm new to all this, I started off using a tutorial. However, the tutorial didn't cover key features such as running, so I stopped using it. After that I just did stuff myself. It's probably really inefficient. It works however. I'm guessing I'll probably just start from scratch and make something that is more convenient.

Here's the site with the picture: https://sites.google.com/site/construct2help1/

Alright, i thought you were saying to do one of those animations was 32 events vs all of them = 32. i dont know if atm this is just a test to ensure everything works or if thats the code you're planning to run with, but it seems you have a lot of "if S pressed set variable to x" "if variable is x, set animation", would you be able to simply say "If S Pressed, set animation"? and then just loop the animation in frame editor? also in instances where you have "when X Happens, set animation" "on animation finish, Do Y" , you could try to just add a wait function, and time out how long the animation is. (helpful hint: Animation speed is in frames per second, so total frames / frames per second = seconds per animation.)
If the keyboard triggers are in for the final game, i would suggest working around the variables, though i know sometimes ill hook animations upto number keys just to check that they work, so im not sure which is the case in your situation, but most things can fit in one event. such as , on x collision with y, destroy y, play sound, set x scale to 1.5, wait 3 seconds, set x scale to 1.
learning to package events is a skill you'll learn over time, and a very valuable one if you plan to use the free version. if event limits are truly an issue, i suggest maybe trying out construct2 vs construct3beta, as it has a 100 event limit for free version, though this is not a viable option for all people.

heres a title screen a made last week, shes a pretty one. but it shows how you can layer everything into literally one event. granted this file isnt interactive, but look for things you find yourself doing over and over and try to link them together somehow. hope i helped somewhat.
https://www.dropbox.com/s/tinenf98waub3 ... C.c3p?dl=0
B
25
S
14
G
1
Posts: 138
Reputation: 3,111


Return to Construct 2 General

Who is online

Users browsing this forum: vubidugil and 3 guests