andreyin's Forum Posts

  • Someone posted a similar question yesterday here:

    scirra.com/forum/360-controller_topic73177.html

    The line of code that Sargas posted at the end does exactly what you want.

    you can use the angle the stick is at to move things around

    angle(0,0,Gamepad.Axis(0,0),Gamepad.Axis(0,1))

    after this you just need to add a "move forward" action when "something"

    I've been messing with it myself and this is what I've come up with:

    <img src="http://i.imgur.com/KdGkLRZ.gif" border="0" />

  • The problem is that you're rotating the object like that, probably to have a "smooth" feeling to the rotation, right? You should just set the angle degree directly to what you want using "Set Angle" instead of "rotate to angle".

    And to make diagonals works, you gotta check if it's between 0 and 50, I think. For instance, when you press up on the analog, the Y goes to -100 and X is 0, but if you press it UP + RIGHT, the Y is -50 and the X is 50.

    If you press it to the right, Y is 0 and X is 100.

    Probably you could translate these numbers directly to angles, but I wouldn't know how to do that..

  • You put the variable you want to save in the data field. If you have a bunch of variables, you could put them all in one array, then save that, I guess.

  • You can check if your car is either overlapping the track and the background, or just the background. Not sure if it would work properly though.

  • Bump, I'm also interested in this.. a way to check if the save file exists, or it's empty.

    I ask because in my game, if there are saves, the "load game" option shouldn't show.

    Edit - Also, is there a way to clear a savestate?

  • There's no way to know unless you show some code or give more info.

    What version of C2 are you using? How are you playing the file, code, etc?

    Try converting the track to .ogg manually in Audacity, then importing it to C2 to the music folder.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hate to bump my own thread, but I still haven't found a fix for this. I made it so my game stretches without any problems, but it gets REALLY slow and laggy if the resolution is above 1080p. Even in the example Joannesalfa showed, the application just stretches itself.

    I'm thinking of making a launcher using another software so I can change the resolution before starting the game, then changing it back when the game is closed (somehow), but that would be my last resort...

    Ashley any idea about what to do? I'm desperate!

    Thanks!

  • I use the dictionary object to store all the speech lines I need in my game. I could've used an array, but IMO the dictionary object is much easier to deal with.

    Each key is the name of the object that the player is currently interacting with, followed by the number of lines they should say.

    What I'm trying to say is: be creative.

  • I've tested with both the 360 controller and a PS2 generic controller using x360ce (which emulates a 360 joystick) and both worked just fine.

    Controller number is 0-3, not 1-4. Maybe that's your problem?

  • Instead of using "wait", try having another button to fetch the data, see if that works.

  • I had the same problem a few months ago, if I'm not mistaken it was a plugin's fault..

  • This is pretty weird, I only import the .ogg files here and C2 has no trouble playing them.

    Make sure you're writing only the name of the file, not the ".ogg" part.

    Adittionaly, if you want to try doing it the way I do it, I just open the music files on Audacity, save as .ogg, and import them in C2. This way it doesn't convert anything, and there's not leftover of .wav and .m4a files.

  • blackhornet THANKS SO MUUUCH! I studied your code and understood what was going on, I think.. This whole thing was really confusing to me but you showed me the right direction. Thanks!!

    Also I have a question for Ashley - is it possible to have a paramter in the audio object to get which is the music playing, since you can only have 1 music playing at a time anyway? I'm thinking of setting a variable to that but that would mean I would have to set it manually everytime I wanted to change a song..

    Thanks again everyone :)

  • Sorry, I should've mentioned the browser! I'm actually using Chrome, though.

    I saw your .capx, that is exactly what I wanted. I'm still trying to figure it out though.. but thanks!!

  • Thanks for the input! I've atually tried doing that but it didn't change anything.. in any case, since I've got the text object showing the variable VolumeMusic at all times, I could see it was working. It went all the way down to -60, waited for a second, then went all the way up to -10 without a problem.

    I'm trying something now that I -think- it might've fixed my problem, but I'm not sure, I'll report back..

    Welp, it didn't work.

    If I set the function like this:

    <img src="http://i.imgur.com/Sm0AuzG.png" border="0" />

    It works perfectly. But as soon as I try to change the volume, wait, then change it again, the music never plays..