shinkan's Forum Posts

  • I though it supposed to act like a Global Variable but in closed environment, in groups for example. So you could be able to do some stuff with it only in certain part of your code.

    I asked about that cause i want to do a simple switch that exist in only one group and belongs to only one sprite. It could be easily done with instance variable or global variables, but well I just want to try local variables to see how they behave.

    Besides I like the way they are not shown in the overall list, if you compare a system variable outside of that group. That makes things less confusing if you have loads of variables.

    [quotes] But in the end, isn't that the supposed behavior?

    I mean, each time the group gets called/executed, the local variable is "reset".[/quotes]

  • hmm ok. to be sure, step by step

    • New project
    • add text object
    • add mouse object
    • create Global Variable = 0
    • create Group
    • move Global Variable into the Group - it's now Local Variable = 0
    • Every tick set text to Local Variable
    • on left click add 1 to Local Variable

    after previewing this layout text object shows 0 - thats correct, but clicking mouse buttons doesnt do anything.

    I did that with keybord object too and with Every xx seconds and still Text object displays Local Variable initial value 0.

    :/

    I've also add another sprite to see maybe text object is not displaying it properly.

    if local variable = 0 - set sprite opacity to 100

    if local variable = 1 - set sprite opacity to 50

    Nothing happens. Local Variable stays at 0, sprite stays with 100 opacity.

  • "On start of layout" works for me to, but try to change it to every tick or every 1.0 sec... or add a Mouse: On Left button Clicked - > Add 1

  • can you do a quick capx file and post it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I't happening with every new project. Create a global variable move it to a group an try to add, substract or set that variable to something different.

  • It seems that once Global variable is turned into a local variable - by dragging it inside the group in my case, can be set only once.

    You can't add, substract, or set that local value later in runtime. If you set it like ie. "Local number Variable = 0" it stays 0.

    It happens on Win 7 64bit, C2 r57. Not sure about previous releasses.

  • but remember that Time Scale is best to use with timedelta as Ashley mention that on other post

    You should always include delta-time (the time since the last tick) in movements. For example, use

    Rotate 90 * dt degrees clockwise

    If you rotate 1 degree per tick like you had, at 10fps it rotates 10 degrees a second, and at 60fps it rotates 60 degrees a second (6 times faster). So to make games move at the same rate you always need to use dt. In the above example, it rotates 90 degrees per second regardless of the framerate.

    When you set the timescale to 0, dt becomes 0 as well, so movements using dt also stop.

  • yes, You can use scroll to X/Y at the start of the layout in events

  • You can set one layer with blur effect and place your character in other layer above.

  • like the star the jews got by the nazis, except this time those without the mark are being targeted.

    You seriously had to say that?

  • It's an invasion ;)

    For users who did not setup their gravatar accounts they get random images with robots.

  • Could someone please translate that to Symbian? can't get my head around that Cygwin thing :(

  • Yes! no need to ask.

  • There was an option in CC "Pick closest", in C2 it's not yet added (hope it will).

    You can do it in many ways. Ie. add a instance variable "pick" or whatever and them compare that value to what you want to do.

  • If you have any questions go ahead and PM in Polish language if it's easier.:)

    same as above ;P

    hej witaj jak masz jakie? pytania to wal do mnie na PM, po Polsku jak b?dzie ci ?atwiej :)

    Edit:

    Tom - still not showing all letters, just saying ;P