oosyrag's Forum Posts

  • Here is an example where the particle angle is always set to the sprite angle.

    https://www.dropbox.com/s/wdoruss24f3f9 ... .capx?dl=0

  • Well... If your world is procedurally generated, your procedural algorithm should probably populate your array as you go.

    If you want to load an array you create manually, you can create it in your spreadsheet program of choice, save as .csv, import that with the AJAX object, then use tokenat to break it up and load it into your array.

    If you're looking for an algorithm to procedurally generate terrain... I'm not much help there but I'm sure there are a ton of tutorials and examples online.

    JSON strings are created from already-populated arrays - you can use Array.asJson to get the contents of the array all in one string, in JSON format. You can then save this string and load it back into an array later.

  • I meant the line of sight behavior approach should be sufficient, also not too heavy unless you really have tons of objects, so I wanted to see how badly it was lagging and if there was anything else causing the lag.

  • Right, forgot about timescale too.

    I found this for you - https://www.scirra.com/tutorials/67/del ... dependence

    [quote:y0tcu69y]Pausing

    You can set the time scale to 0. This stops all motion. It's an easy way to pause the game. Set it back to 1 and the game will resume.

    You might notice you can still do things like shoot using the game controls. You can get around that by putting your main game events in a group, and activating/deactivating that group as you pause and unpause.

    It's also a good way to test you have used dt correctly. If you have used it correctly, setting the time scale to 0 will stop everything in the game. If you have not used it correctly, some objects might continue to move, even though the game is supposed to be paused! In that case you can check how those objects are moved, and make sure you are using dt properly.

  • https://www.scirra.com/manual/110/browser

    [quote:22e56rey]Open URL in new window

    Navigate to a given URL in a new window (or tab if the browser settings override). This continues to run the HTML5 game in the old window or tab.

    edit: ninja'd ><

    It should work. Is your URL in quotes?

    Browser - Go to "http://www.google.com" in a new window ("NewWindow") [/code:22e56rey]
    is how it shows up on my event sheet, and it works ok.
  • You're right, I'm not so sure it would either.

    Remember behaviors are just shortcuts - everything a behavior does for you you can actually recreate with events. They might have some limitations, so if you want a more complex behavior, you may need to create it yourself with events.

  • It really is up to you. General tip is to not try to put too much information all in the same array, or it may get harder to manipulate/access the information you want. But other than that use whatever organization system makes sense to you.

    A big consideration for me is usually that you can only use IndexOf on the X axis of any given array.

  • Quick way I can think of is use "On collision with another object" - set Sonic's angle as the same angle as that object.

  • Any clue what index right stick axes are?

    I haven't used this object myself yet, but you could test this pretty quickly. I've made a capx for you. I hope it works, I can't check myself as I don't have a gamepad hooked up.

    https://www.dropbox.com/s/8pes8gkyav87f ... .capx?dl=0

    The reason it probably isn't specified is because there are many different gamepads out there, each with different amounts of input axes/mappings.

  • It would be hard for me to give a specific answer without seeing your situation. The answer would be use the one that best fits your needs!

    You said you were already using force for your normal movements. I assume you would apply them on the ball. Either apply more in the same direction you already are applying for when you're going uphill, or maybe apply at an angle depending on the slope of your hill to be more efficient.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your method seems OK. Do you have a example capx?

  • Hi, I don't see anything wrong. What is your question?

  • You need an expression to get the angle between Sprite1 and Sprite2 with a little math using arctangent (atan(x)).

    The angle between the two is atan((Sprite1.Y-Sprite2.Y)/(Sprite1.X-Sprite2.X)).

    Edit: Never mind!! I didn't even realize there was a specific angle expression for that. Angle(x1, y1, x2, y2) - Calculate angle between two points

  • Layout scale is a system action.

    Set up a condition for when you want to zoom, such as On Start Of Layout. (Or on key press, or touch, ect.)

    Then use the action System - Set Layout Scale.

  • If you want it to go uphill, you'll need to either add force or impulse.

    https://www.scirra.com/manual/98/physics

    [quote:3d57i5m2]Apply force

    Apply force at angle

    Apply force towards position

    Apply a force on the object, either at an angle, towards a position, or with custom X and Y axis forces. Applying a force causes the object to accelerate in the direction of the force. Forces can be applied from an image point or the object's origin.

    Apply impulse

    Apply impulse at angle

    Apply impulse towards position

    Apply an impulse on the object, either at an angle, towards a position, or with custom X and Y axis impulses. Applying an impulse simulates the object being struck, e.g. hit by a bat. Impulses can be applied from an image point or the object's origin.