Gravity / Sounds

For questions about using Classic.

Post » Wed Feb 17, 2010 7:02 am

Hi.
I was trying to make the fall gravity to be constant, but I couldn't.
I wanted to do something like, if Vertical Speed (Constant Y motion) > 200, then make Vertical Speed = 200. But I can't get the vertical speed as condition :?
And no, playing with Platform behavior won't work, I've tried that and just ruins every setting I have.

I'm trying to make a jump equal to Mega Man X (or Mega Man), where megaman jumps and when falling, the gravity doesn't add speed to the vertical Y speed. I know, is not real, but that's how the game is.

Other thing, is not related with the topic but is still bugging me. Sometimes the sounds doesn't play very well. I have a sound for shoots, a sound for collision between bullet and enemy, and a sound for explotion of enemy. If I shoot very fast, sometimes the collision sound doesn't play, or the explotion sound, so the enemy just dissapear without the explotion sound, that's weird. I've updated the DirectX recent version, and still... It would be very sad if that kind of errors (gravity, sound, or save freature), don't let me finish my project, I have a lot of conditions and event sheets finished :( .

Well, thank you. :)
?When everyone feels hope at the same time, wonderful things can happen.
B
5
G
3
Posts: 67
Reputation: 1,059

Post » Wed Feb 17, 2010 7:48 am

[quote="Carlos182":2i19medq]Hi.
I was trying to make the fall gravity to be constant... But I can't get the vertical speed as condition :?... [/quote:2i19medq]

If it's not available as a compare condition for the behavior in the wizard you can usually do a "Pick by comparison" and get the expression. Which is the case here. The actual expression is Sprite[Platform].VectorY. Or you could use a System compare I guess.

[quote:2i19medq]when falling, the gravity doesn't add speed to the vertical Y speed. I know, is not real, but that's how the game is.[/quote:2i19medq]

All you have to do is set the Max Fall Speed.

Out of curiosity, what version are you using?

[quote="Carlos182":2i19medq]Sometimes the sounds doesn't play very well. I have a sound for shoots, a sound for collision between bullet and enemy, and a sound for explotion of enemy. If I shoot very fast, sometimes the collision sound doesn't play[/quote:2i19medq]

Are you playing from resources or from files? Are you playing the shooting sound on a channel or are you autoplaying it? Is the sound trimmed and optimized? What do your events look like?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Feb 17, 2010 7:30 pm

First of all, thank you deadeye, you are always a great help :D.
Ok, so, I'm using Construct v.0.99.62, I tried to change to new ones but they screw up my Platform settings and other things, so I think I'll stay on that version.

About the sounds, I'm doing an autoplay resource every time an event occours, like for example, if Enemy HP is less than 1, then Autoplay resource "explotion.wav". And I have that for all the sounds. Is that a problem? Should I sepparate them into channels?

Other thing I have problem is when the player touch the celling, it seems like it bounces; I can't get the same effect from the original MMX game. Anyway, seems like I have to play with my events.

I'm trying to modify the FPS of the game, but it feels the same way. It have 60 FPS, and even if I change it into 30, or 90, the game is still the same. Is that feature working on the .62 version?

Thanks again.
?When everyone feels hope at the same time, wonderful things can happen.
B
5
G
3
Posts: 67
Reputation: 1,059

Post » Fri Feb 19, 2010 5:09 am

I remember fixed framerate working in that build. Did you check the "Use fixed framerate" option? without that enabled, the FPS number has no effect.

About the sound: Autoplay chooses an unused channel, so sounds should never (up to 64 simultaneous, I think) block each other... are you playing any OTHER sounds WITHOUT autoplay? If so, that one could be canceling an autoplayed sound.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Feb 19, 2010 5:19 pm

I have all my sounds in Autoplay, except 2.
1 is for the music, I have XAudio2: Play music "Songs\music.mp3", but anyway, it is toggled.
And the other is a looped sound. When a condition is true, I load a resource into Channel 5 and also Play Channel 5 (no Loop). When the next condition is true, I stop the Channel 5 and also load a resource into Channel 6 and play Channel 6, this time in Loop. When C key is released, I stop Channel 5 and Channel 6 (it's part of my conditions for the Charged Buster).

Do you see anything wrong there? (I guess, the problem is the condition when C key is released, stops the Channel 5 and 6 and maybe the sounds of buster and explotion are there...)

Thanks.

BTW, I can't see the Use fixed FPS option.
?When everyone feels hope at the same time, wonderful things can happen.
B
5
G
3
Posts: 67
Reputation: 1,059

Post » Fri Feb 19, 2010 7:17 pm

Right when your game starts up, you should reserve channel 5. This means that autoplay won't choose it, ever, unless you.... un-reserve it. Or something.


If that doesn't fix it, well, no idea. Post a .cap then >_<


EDIT: Right above FPS there's a list with "framerate mode" (wasn't a checkbox at all, sorry), you have to set it to "fixed"
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests