Asmodean's Recent Forum Activity

  • What is a local variable? I think I made one by accident a while back when I tried to put a global variable inside a group.

    That is how you make a local variable. The scope of the local variable is only for this group. The benefit is if you make an event and use a variable you will only see the globals and the lokal variables from this group. It's all about clarity.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would try to arrange the events in groups and use lokal group variables. For me that is much more clearer and lokal variables are some times the better choice over instance or global variables.

  • Not perfect, but maybe it can give you an idea how to achieve it.

    https://drive.google.com/uc?export=down ... g3diGeg2At

  • You could go to an older release:

    https://www.scirra.com/construct2/releases

    and change the version of your capx.

    The capx is only a zip-file. You can unpack it (maybe renamoe capx to zip) and in the folder there is .caproj-file. Open it in an editor and change 'saved-with-version' to the version you have.

    Save it and now make a double click on the caproj-file it. C2 should open it now.

  • [quote:266mow6t] After the last update I start having this bug, I dont know if it is only concidence.

    It's not a coincidence. I tried your capx with 252 and 255. No problem with 252 but I get the error with 255.

    So it seems there is a problem with 255.

  • matrixreal

    I have a C2-Plugin that check for tablet or phone it based on mobil-detect.js. But it's not 100% reliable because it depends on 'userAgent' from the Browser and this behaves different on different mobil browsers.

  • What effect do you want to achieve? After disabling the platform-behavior the box snaps to imagepoint1 and the sin-behavior started. Isn't that what you want?

  • You have to disable the Plattform-Behavior or at least set the gravity to 0 in event 94 when the EnergyBox is put in the EnergyPlug . Then it should work.

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

Asmodean's avatar

Asmodean

Member since 31 Jul, 2015

Twitter
Asmodean has 9 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies