Asmodean's Forum Posts

  • Is it possible to use For each loops to iterate over nested.

    My guess, it's not possible with 'For each', because the first 'For each' picks a sprite and for the second 'For each' there is only this sprite visible.

    But it should work with a normal 'For loop'. You can address a sprite directly with Sprite(IID).

    It would look for example like this:

    + System: For "loop1" from 0 to Sprite.Count-1

    ----+ System: For "loop2" from 0 to Sprite.Count-1

    -----> Text: Append Sprite(Loopindex("loop1")).UID & " "&Sprite(Loopindex("loop2")).UID & newline

    This puts two UIDs from the sprites in a line in a Textbox. With loopindex("name of loop") you get access to the currently loopindex of this loop.

  • I think, the easiest way is with 'tokenat'. If you have more complex command you have to use Regex.

    from the manual:

    "tokenat(src, index, separator)

    Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges."

    I made a little example with tokenat:

    drive.google.com/uc

    the commands are: left, right, up, down, and the amount of pixels to move.

    left 50 for example

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to have a global constant that has an exponential expression like:

    c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07

    c1=float("1.009249522e-03");

    or

    c2 = "1.009249522e-03"

    c3= float(c2)

    The exponential expression has to be a string and with float it is converted to a float

    Edit: I see you wrote constant

    If you define a constant you can use 1.009249522e-03 but this will converted to 0.00100925. If you need the exponential expression put it in a string and if you want the float convert the string to a float.

  • As always, I don't know if I understand this correct, but you could use ' is overlaping at offset' . Therewith you can find out if something is left, right, up ,down of your player.

    I made a litte example:

    drive.google.com/uc

  • Set the point of origin (imagepoints) in the sprite editor to the upper left corner (press 7 on the num-pad).

  • Maybe I understand it all wrong, but test it yourself :)

    drive.google.com/uc

  • Is there other easier ways that I can't think of?

    Maybe i understand this wrong, but if you have the IID of the parent and the child you could do this for example:

    System| Pick Sprite Instance (IID of Child) -> Sprite| Set variable to Sprite(IID of Parent).variable

  • This is because of the origin in your trail-sprite. Put the origin to the middle of the left border. (4 on the numpad) and it should work.

  • Do you use Chrome?

    Then try to look how much storage space is free (Press F12 then the Tab Application and Clear Storage).

  • > Is WebGL and WebGL2 Hardware accelerated?

    Yes

    > Is GL_RENDERER your R390?

    Yes

    Then I run out of ideas. The last one is speed throttling of your GPU. Is maybe the temperature of your GPU to high?

  • AMD Radeon R9 390 Series

    try: chrome://gpu/ in Chrome.

    Is WebGL and WebGL2 Hardware accelerated?

    Is GL_RENDERER your R390?

  • Webgl doesn't change anything, same for 32 & 64bit C2 & browser. All drivers are updated. Ram (Dual channel DDR3 4x8GB) is perfectly fine, no faults detected. No malware detected either. Windows event logger doesn't show any useful errors.

    Did you use the Intel® HD-Grafik 4600 from you i5 or do you have an extra dedicated graphic card?

    The 4600 is blacklisted in Chrome.

  • So, this i need is "simple", i need to continue moving on path.

    My guess, the physic-behavior sets all to the default settings after disable it. So the force in x and y is 0 after enable it again.

    I would save the sprite 'AsJSON' in a variable when clicking the button and after clicking the button again load the JSON to the sprite.

    Example:

    drive.google.com/uc

  • I would use 'On collision with' and make the collision polygon of the num-pads a little smaller so they got only triggered if the mag-sprite stands in the middle of them.

    little example:

    drive.google.com/uc