SimoneT's Forum Posts

  • You have to make your condition an 'or' block before adding another condition. Dont forget to click on the whole condition (on the very left of the block).

  • Ok, yes I see it.

    I change your pin behavior to:

    Every tick => Pin: set position to Player (set position to another object), no more blurs.

  • You should also set the max speed of the player back to 90 after the release of the "S" key. Then you can get rid of the "Every 0.5 seconds => set player max speed to 90" x2, that slows things down a bit.

  • Are you talking about the wall sprite that appears to be dancing as it scrolls by?

    If so, try going in your project's properties and change fullscreen scaling to high quality.

  • There are many reasons why that might occur. My suggestion is to start another post and include a capx so that others will have a better insight of what's happening.

  • Yes, it is in General section of behaviors.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you tried the Timer behavior? Add the behavior to your player sprite object:

    Keyboard: On "A" pressed => Sprite: Start Timer "timer" for 0.5 seconds (Once)

    Keyboard: On "A" released => Sprite: Stop Time "timer"

    Sprite: On Timer "timer" => Set animation to ''Attack_Player'', Create object ''Damage''

  • Hi,

    Just to be clear, you want the action (Set animation to ''Attack_Player'', Create object ''Damage'') to be triggered only if the "A" key has been pressed for 0.5 second?

  • Hi,

    Add an instance variable (example: "Class number") to your object.

    To check how many there are you can write:

    System: Every tick >

    (sub-event) Object: compare instance variable (value=x) > System: set Global variable to Object.PickedCount

    Hope this helps!

  • Hi,

    I'm confused, I need more info. Are you expecting different numbers in your textbox input and therefore trying to separate (parse) them into individual number data? Or are you trying to use a number typed into a textbox as a global value. If it is the latter I would do this:

    TextBox: On text changed > System: set "GlobalVariable" to int(trim(TextBox.text))

    int() changes a string into an interger and trim() makes sure you didn't accidentally hit the space bar. You can also change to condition to when button clicked if you want to wait for the full number to be typed in.

    If this has not answered your question, please give an example of what you are trying to do.

  • Hi,

    Why not add an boolean instance variable to the objects that are subject to blend and add an action under the blend change that sets boolean to true. Ex.:

    Click on: Sprite > set blend mode of Sprite to "Destination In"

    > set Sprite boolean "Blend normal" to "False"

    Sprite: is instance boolean set > whatever action you want....

  • Hi, here is an excerpt from the "Project primitives > Projects" chapter of the manual that I think will answer your question:

    [quote:y4vr6eny]Pixel rounding

    By default Construct 2 objects can be drawn at sub-pixel positions, e.g. (100.3, 200.8). If the browser is using linear filtering, this can make fine pixel art appear blurry. If Pixel rounding is set to On, Construct 2 objects round their position to a whole number before drawing, e.g. (100, 201). This prevents any blurring, and can also prevent "seams" appearing on grids of objects. Note this does not affect their actual X and Y co-ordinates, which can still be between pixels - it only affects where they are drawn on the screen.

    I hope this helps.

  • korbaach

    YES!!!! So simple. I just started learning about using external files and this never came up in anything I read so far.

    Thank you so much for taking time to help me!

  • Hi there!

    I am trying to create instances with random animations but I am having problem with text info from arrays. I made this simplified capx to see if other code was messing with the results, but I came up with the same problem:

    The sprite object has a "Name" variable. As I create the different instances in a for loop, I give each one a random value: Red, Blue or Green. Then I set the animation to Self.Name.

    For the first row of sprites, I used:

    set "Name" to choose("Red", "Blue", "Green")

    and that worked fine, but I plan on having many more values to choose from and I want to be able to modify those using an external file loaded into an array. So for the second row, I used:

    set "Name" to Array.At(round(random(Array.Width-1)))

    In the debugger, I can see that the "Name" variable works, but the set animation command seems to be ignored. I tried putting str() in front of the command, just in case it was not reading text...

    I am stumped. Can anyone please figure this out for me?

    color generator problem