Sargas's Forum Posts

  • [quote:2y36gdfc]Compare orientation (manual: Touch)

    Compare the device's current orientation, if the device has a supported inclinometer. Alpha is the compass direction in degrees. Beta is the device front-to-back tilt in degrees (i.e. tilting forwards away from you if holding in front of you). A positive value indicates front tilt and a negative value indicates back tilt. Gamma is the device left-to-right tilt in degrees (i.e. twisting if holding in front of you). A positive value indicates right tilt and a negative value indicates left tilt.

    meaning you need Beta for moving in Y axis and Gamma for moving in the X axis.

  • considering that the shape of the objects is not always square, i would just set a bunch of triggers to change the direction of the object that's is moving.

    of course, you can set the triggers invisible so they don't show up in game.

  • i don't get it, what is it you want to do? my example did what you said you wanted, didn't it? did you run it?

    your line 16 might be preventing the value to be set, i'm not sure if whether if 16 or 13 is going to happen first. Use ELSE like in the example, so a command takes priority.

  • I made you an example. I think this should solve the problem.

    I used distance that check the "size" of the movement, and created a variable you can use to filter out events that need to.

  • LaroTaio you're welcome

    did you read the begginers tutorials?

  • nimos100 just tell the game to wait 1*dt seconds or 0.016 seconds, both are just 1 (ONE) tick worth of waiting. Don't know any human on this planet that can be bothered of having to wait 1/60 of a second for something. do you? xD

  • well, it's working as intended actually.

    every tick all values are stored for use.

    and on tick 1, green coordinates are "A". and you're telling purple to go to place A, that is green location for tick 1. Green's stored location is not going to be B until after it has been moved, which won't happen until tick 2.

    what you're asking for is that somehow the games stores all the values in a non-existent tick 0 that happens before the command is even issued.

    what you're doing with the "wait x seconds" actions, is effectively tell the game to wait for tick 1 to finish, at which point green's locations is stored at the destination.

  • are you saying that a 1 tick delay is messing up your game??

  • uok, my bad that's actually pretty good though =P

    But not every effect can be managed in the project properties. others, like "exposure" that would effectively render your objects white, can be set to 0 on project properties and then manually to a big number on a trigger in the events.

    Keep in mind, however, some older mobile devices can't run webGL, which every effect needs to run.

  • you could set a variable "type" to the familly, and set every object A to type=1, object B to type=2, and so on.

    then you can do this:

    eg:

    "family type=2" ----> and only objects with type=2 would be called.

    Just be sure to set the proper numbers to the objects. if they are already in the layout on start, you can set them manually, but on creating them you'll need to "set type to X".

  • why don't use the flash behavior instead?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I added some comments to it too.

  • Let me see if I understood what you want:

    1) click an object.

    2) that objects shows a countdown (like, 3...2....1...)

    3) when the countdown is finished, another object appears (i'm guessing some sort of "confirmation" pop-up)

    4) when you click that second object, you change layout.

    if that's the case, then it's super easy

    1)Create your "button"; could be a sprite, a text or a button object. and create a variable called "countdown" on it, and set it to 4.

    2)With the mouse or touch object use the condition "on object clicked/touched" (that object has to be your button) ---> set it to 3.

    3)Then on another event make this: When object.coundown =or< 3, every 1 seconds, as long as it's greater than 0 ----> object: substract 1 from countdown.

    4)And when object.countdown = 0; make the second object appear by setting it's position to where you want it to be. (originally have it placed outside the layout,)

    5) and when that object is touched/clicked -----> go to desired layout.

    In order to display a text over the first object, there are several ways; you could make the object with 5 sprites and set frame to timer. or you could place a text over it and set that text to object.timer.

    Also, I really recommend you go trough the beginners tutorials as this is really basic and you should have learned it there. Then read the manual at least once, so in the future you know what to look for when in doubt.

  • You're doing it backwards. You need to set the GlobalVariable to the WebStorage.LocalKey.

    take a look at this fine example i just made for you ♥

    Fine Example

  • LaroTaio

    But, the margin doesn't have anything to do with performance... Just like a huge layout won't slow down your game, the amount of objects in it will.