Guizmus's Recent Forum Activity

  • To locate your problem, you may want to start by looking if the AJAX request is done, or if any problem appends during the request. What does the console give you on the request ? Aborted ? Cross-origin problem ?

    You could also use the "on error" event in C2 to check if the request goes ok or not.

    I tried the same thing you did on a userscript (cross domain AJAX, displaying the return) and had to change my way of allowing cross origin depending on the server I used. This may be also your case, not all servers allow the use of this header, some will make you use an htaccess instead.

  • In the sprite conditions, you have a specific one for the Z-order : pick top/bottom. This will, giving a current selection of those sprites, filter only the top or bottom instance, for you to change its frame.

    screenshot

  • For this to work, you will need a variable to store the angle offset of the start of touch :

    When the touch starts, you calculate the current angle between your wheel and the touch. Let's call this Alpha, Alpha = angle(wheel.X,wheel.Y,touch.X,touch.Y)-wheel.initialAngle

    (wheel.initialAngle is the angle of the wheel when the touch starts)

    Then, while the touch is active, you set the sprite angle to angle(wheel.X,wheel.Y,touch.X,touch.Y) - Alpha

    This will make the wheel follow the touch (as the current angle will change just as the touch angle changes), and when the touch starts, the angle will be set to Wheel.initialAngle (so it won't jump to the current touch angle)

  • The bullet behavior won't be stoped by the collisions on its own. You would have to make a "on collision" -> "destroy" to make it stop when touching the wall, where the physics would do all the job. So there isn't a problem in fact, you just have to do nothing for the bullet to pass through the wall. Instead, you have to add events for the bullet to stop when it hits a real obstacle !

  • No problem ;) If you need the "," for anything else, you can change it in the file with a ";", or any other separator, and change it in the events too (in the tokenAt function and tokenCount)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do you wish to store your "String arrays" in the txt file ? as JSON ? 1 string per line ? with a separator like ";" or "," ?

    Here is a simple capx I made for loading N words from a txt file during runtime. You can store the words as you prefer in the for loop.

    Hope this helps !

  • Ok, got my computer back up.

    As I said, a sample capx is always nice to test. I didn't need your project, just a grid, a player, and a ground. So here it is.

    capx

    It's a tiledBg grid, a snap like I suggested with some offset, and a reposition every tick (that can be optimized).

    Also added a click on grid to spawn the ground just to test if the snap to grid was correct.

  • My computer is down right now, so I'm having hard time explaining and testing, sorry.

    I wouldn't use a sprite for the grid, but a tiledBackground, as it's the same sprite repeated X times. With a single object to move, it would be easier.

    If you need to keep N sprites for any reason, then you'll have to add a different offset for each one, and keep track of witch cell is witch (lots of events/variables for this though).

    If you don't use an every tick, how do you do it right now ? a condition "Player.plateform Is moving" could do it (witch is also an every tick with a condition by the way).

    Hope this helps, I'm trying my best ^^

  • RookieDev

    I'm not sure I understand your question. I can make you an example tomorrow if that's what you need. How did you do it ? Is it working right now ? Can you give a sample capx for testing ?

  • You don't have to set mime type in C2. Audio is handled by the audio plugin and will choose, depending on the platform the project is running on, what format to play and how to play it.

    Just add your music to your project, and play it using the Audio plugin.

    Look through the manual entry for further explanations on how to play audio, apply effects, loop, ... It's pretty easy to use, and you can thank a lot Ashley on this one, as the Audio in HTML5 isn't as simple as it looks like if you want it to run fine everywhere.

  • Don't worry, functions in C2 are as operational as they are in pure JS.

    You can use the function parameter by calling the expression "Function.param(X)", X being the index of the parameter.

    I use functions in lots of cases. For example :

    <img src="https://www.scirra.com/images/articles/TLE7_2.jpg" border="0">

    (this is explained in a tutorial linked in my signature).

    Also, here is a capx I made some times ago to explain the basis of functions.

    Finaly, you can take a look at the function reference in the manual. The end of the article will explain all conditions/actions/expressions of the function plugin.

  • Hello,

    This isn't a bug report yet, since I can't reproduce this 100% of the time. I'm making this post to see if anyone else has encounter this, and may add some usable information.

    Since R138 (and in R138.2 too), I'm having random crashes on C2, in various cases.

    First I had was when switching from an event sheet to a layout in editor. With no reason that I could understand fully, all the sprites started to "forget" their current image, and the program crashed with no bug report to help.

    I also had 3 times a crash when just "waiting" in an event sheet, doing nothing but looking through the code (even one time without touching my mouse or keyboard).

    The same project 5 min later didn't crash at all, and I could sometime work around 2 hours without problems.

    One of the 3 times was just after a restart of my computer,

    I never had any problem with C2 since I started using it, and as far as I can tell I didn't change anything with my computer since.

    I'm using a windows 7 SP1 up to date, on a x86 processor (intel core i7).

    I'm sorry this "report" isn't accurate, and I would love if anyone having similar problem could report it too. If you have any usable information, I'm sure this could help, as this initial post is worthless as it is.

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies