Asmodean's Forum Posts

  • You have to use the correct name of the effect:

    -> Sprite: Set effect "Pixellate" parameter 0 to 10

    The name of the effect is case sensitive, so it's "Pixellate" not "pixellate".

  • Yes but I could not get it to work. It seems that any float that ends with a .o is automaticly changed into an int.

    Me neither. But this works:

    Global number count = 300
    
    + System: Every 0.1 seconds
    -> System: Subtract 1 from count
    
    ----+ System: count%10 = 0
    -----> Text: Set text to int(count÷10)&".0"
    
    ----+ System: Else
    -----> Text: Set text to count÷10
    
    [/code:3cfa6wbg]
    
    I cant get it to work with floats so i have do divide in the textbox.
  • Let's say that I want to check if an object's angle is at all close to 90*... I set the range to 5*.

    Does this mean that the game will check if the object's angle is between the range of 85* to 95* (a total range of 10*)?

    Yes, it checks ±5° of the angle (a total of 10°).

  • What I mean when I say 1/4 of the screen and 3/4 of the screen is something like this. Imagine that "*" is the player and this is the screen [....]

    Moving right [.*..]

    Moving left [..*.]

    I would do it without ScrollTo, like that:

    You don't need a global variable. You can do it all in one line, but I think for explanation this is more readable.

    In 'On start of Layout' the size of the viewport will be calculated. Normally ViewportLeft will be 0 at the start, so the viewportSize would be equal to ViewportRight, but if you make this calculation after some scrolling or all calculation in one line it would be the wrong size. So this is more correct.

    In the events 2 and 3 you look if the x-position of the sprite is a quarter form the left viewport border or the right. If that's true it scrolls with the speed of the 8Direction-Behavior to left or right. In this case you will allways be a quarter from left or right border and you will never reach borders of the viewport.

  • Maybe I understand it wrong, but why do you set the boolean to false after the action is done and set it back to true if you want to do the action again?

    System | For each sprite 
             sprite.boolean is On ->  | do action
                                        sprite.boolean=false
    [/code:t1ot89o9]
  • The reason that it doesn't work is if you pick a certain instance in an event you can't pick another instance in a sub event.

    Example:

    Touch | On tap gesture on Sprite

    Sprite | Variable1=0

    ...................Sub-Event | .....

    Only instances from Sprite with Variable1=0 will be accessible in the sub-event.

    If you want to pick another instance you have to use 'Pick all'.

    Touch | On tap gesture on Sprite

    Sprite | Variable1=0

    ...................System | Pick all Sprite

    ..................................System| Pick Sprite where Variable1=1 -> Sprite | Destroy

  • This works fine for me:

    """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"" "

  • Asmodean What version of Construct 2 are you using? Perhaps mine is outdated.

    R250 C2

    R80 C3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tried it on my Android OS and chrome browser. Okay... So if I can't use that specific command, is there any other way of saving and printing the entire screen, including all text boxes (which simple canvas snapshot can't do)?

    It works for me with Chorme on Android. I get a save to PDF dialog. It doesn't work on FireFox. I read that it should also work on iOS and Safari, but i can't test it.

    Canvas snapshot works fine here on mobil Chrome and FF. No problem with text boxes.

  • I tried printing it directly from phone to printer using... On Touched Object -> Browser -> Execute Javascript -> "window.print();" .... but nothing at all worked when I tried this method, as if I didn't Touch any object at all... The print options won't show up:(

    Can someone please help me with this issue?

    On which OS and Browser did you tried it? The command isn't supported on all mobil-OS and Browsers.

  • You can use FireFox to look what the cause of the stuttering is. Start your game and press shift+f5 (performance tools) and start the recording, after a short time stop the recording. Now you can see if you have frame drops.

    Mostly it's the garbage collector.

  • Try with:

    System | Every Tick -> Enemy | Set Bullet angle of motion to Angle(Enemy.X, Enemy.Y, Player.X, Player.Y)

    That should work.

    Maybe you have to rename player and enemy into the name of your sprites.

  • In the properties (left side of the editor) of the bullet behavior there is a property 'set angle' set it to 'no' and it wont rotate. You have to click on the sprite with the behavior to get the correct properties.

  • nicklowkcmagic

    set the instance variable to 1 or -1, depends of which direction you want at start. Then change your code to:

    Player | FlipGravity=1 -> Player| SetPlatform gravity to 1500
    Player | FlipGravity=-1 -> Player| SetPlatform gravity to -1500
    
    Keyboard | On space pressed -> Player | Set FlipGravity Player.FlipGravity *-1
    
    [/code:1555fvp9]
  • Have you tried after changing the the size of the canvas to use 'scroll to position'?

    You could scroll half the amount you add to the canvas to the left and top. Then you should be on your old position.