tgfcoder's Recent Forum Activity

  • What do you mean by adding strange values? Maybe your event is firing multiple times per click?

  • You would probably have to use Custom obstacles for the Pathfinding behavior, and have invisible obstacles all over the screen, so that when you place a path, those obstacles get destroyed and you can regenerate the obstacle map around the object. Because what you want is basically to specify where the object can move but the Pathfinding behavior only allows you to specify where it can't go.

    Here's an example: https://www.dropbox.com/s/85nsk1k5u3z8wrb/Path.capx?dl=1

    Use the left mouse button to place paths and click the right mouse button to move the character.

  • Assuming you're using X/Y dimensions of your array:

    Something like this should work. The second condition is System > Compare two values

  • The Monster's speed is set when the new monster in created. After that, the monster's speed is not updated. If you want all monster's speed to update, you can use an event on Every Tick (either use the one already made or make a new one) and do the action: Monster > Set Movement speed > to MonsterSpeed. Since no particular Monster was "picked", this will apply to all Monsters. In the case where one was created, it also gets "picked", so the next action only sets the speed for that Monster.

  • System > Create object allows you to create arbitrary objects.

  • Colliding with multiple walls at the same time is most likely. You probably don't want multiple walls stacked onto each other for performance issues, but to solve the problem you can set an instance variable to mark whether the ball has been "scored" and check that before adding score. That way only the first collision will add to the score for that ball.

    Something like:

    On collision and ball scored = 0: Set ball scored to 1, add 1 to Score, set text to Score and Destroy ball.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a little problem writing functions with System.Wait in them. For example this works just fine:

    producing

    but simply adding a wait like

    shows this:

    and this is because, as I understand, the function parameters are no longer accessible from the point after the Wait, and hence are 0. If we use local variables, the same problem occurs. The scope of the local variables seems to behave similar to the Function parameters, except now the string is blank, so there is nothing to see.

    Making the local variables static sort of solves this problem but brings in another issue. Separate calls to the function have access to the same variables, which can lead to unexpected results:

    (I've added a random to the Y value to demonstrate that there were two calls that essentially are using the values from the second call.)

    One solution might be to pull the wait out of the function. However, if the wait is variable and a part of the function parameters, pulling this out means I have to do the wait before every single call to the function, which is bad design.

    My question is, is there a workable way to hold function call specific data between waits that don't interfere with other calls to the function? Function scope variables (that would be passed through to the events after waits) would be very nice to have, and in fact function signatures (with parameter guidance like inbuilt functions) and autogenerated variables in the "On <function>" event would be awesome.

    Capx used: https://www.dropbox.com/s/ze7gmtmdevaro ... .capx?dl=1

  • You can use System: On start of layout: Browser: Execute javascript "cr_setSuspended = function() {};" to get around this.

  • Would it be possible to include this as a note in the manual / in-editor text for both Width and Height? Something like Sprite.Width: Get the object's width, in pixels. This value may be negative if the object is mirrored." May save someone some head-scratching, for example I just now set an object's scale based on a (mirrored) object's width. It came out upside down due to the negative scale.

  • Problem Description

    The Audio object's "Set master volume" event takes in Decibels, but the Audio.MasterVolume property returns a volume value from 0.0 to 1.0.

    The manual here (https://www.scirra.com/manual/109/audio) states that MasterVolume returns the current master volume set using the Set master volume action.

    Furthermore, the in-editor description of this property states "Get the current master volume, in decibels."

    Attach a Capx

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

    Description of Capx

    Simple example of showing difference between Decibels value and Audio.MasterVolume property

    Steps to Reproduce Bug

    • Run project
    • See that Audio.MasterVolume differs from "Decibels" value
    • Press up and down to see other values

    Observed Result

    Decibels greater than or equal to 0 produces MasterVolume = 1, negative values of Decibels produces fractional values of MasterVolume

    Expected Result

    MasterVolume equals Decibels. It would also be nice to set/get the volume controls in a 0-1 scale as this makes more sense for volume controls (a useful formula is Decibels = ln(Volume + 0.0001) / (ln(10) / 20))

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 Service Pack 1

    Construct 2 Version ID

    Release 190 (64-bit) built at 14:54:22 on Nov 25 2014

  • AnD4D Oh yeah true. Edited my post xD

  • I know if you're using the Physics behaviour you can use Physics: Global Settings -> Set World Gravity and use a negative number e.g. -10 to switch gravity up/down. You may also want to flip your character so they land on their feet and not their head. <img src="smileys/smiley36.gif" border="0" align="middle" />

tgfcoder's avatar

tgfcoder

Member since 8 Feb, 2014

None one is following tgfcoder yet!

Trophy Case

  • 10-Year Club

Progress

10/44
How to earn trophies