tgfcoder's Forum Posts

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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" />

  • Hey all, I'm a hobbyist game developer with experience in The Games Factory before moving onto Python, C++, C# w/ SDL (pygame) and XNA. I stumbled across C2 the other day and thought it showed some good potential to make quick accessible games. I'm quite fond of web apps because of the cross platform compatibility that it affords, and the fact that the Internet isn't going anywhere soon.

    My personal site is here (forums here) and I'm eager to play around with C2 some more in my free time (between working!)

    Happy to join the community, too.

    Cheers,

    Jordan

  • Hi there! I'm new. I'm currently in the middle of putting together my first game. I am a hobbyist game developer looking to turn around some quick games with C2.

    What I'm trying to achieve is a consistent effect in all the layouts of the game (WebGL Noise.) What I'd like to know if there is a simple or conventional way to do this? If I am able to add layout effects programatically, I can do this at the start of a common event sheet, but I can't find any such action.

    I will be designing the different levels of the game in different layouts, does this mean I have to add the effect(s) to each layout within Construct 2?

    Wondering if anyone had a solution like grouping layouts like the way Families group objects, since I would like to be able to keep the look and feel of the layouts consistent.

    Cheers,