caiorosisca's Forum Posts

  • just break your url with a " "(space)

  • Just use system> create object> Family... it will randomly choose 1 object from that family..check the example capx

  • Start of layout(for example)> AnyObject with physics> set world gravity 0

  • It might be, I see no reason for it not to work, code wise.

  • In this example I set the bullet speed to the distance between the cannon and the mouse/touch * 2.

    2 is just a random number that i tought looked good in that case, you can adjust it for your needs, also, add a scroll to behaviour to the bullet so the camera follows it.

  • It's working for me. chrome

  • Set the origin point to the start of the hand(like in a real clock), add a touch object to your game (could be mouse, I like touch so it works on mobile too), if Touch> is in touch> set hand angle to > angle(hand.X, hand.Y, Touch.X, Touch.Y)

    this should guide you in the right way.

  • Made this little capx as an example for you, just check how it works. It is pretty simple

  • Could you upload a capx? makes it easier to see whats happening. Also tell exactly what you are trying to achieve and me or someone else might be able to help you.

  • Thanks Ubivis, I must really have missed that, went throught the manual and didn't find it.

    Just in case anyone is interested in how I solved it, I saved the playbacktime on WebStorage just before loading the game, then on load complete I play the sound using seek to webstorage.localvalue

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you are looking for the a better way, global variables really isn't your answer, as DUTOIT said, I would go with a dictionary.

    It isn't hard to understand at all, even if you never used it. A dictionary is a list with 2 colluns, imagine something like that

    key value

    "key1" 2

    "banana" 5

    "green" 3

    basically you can store anything on it, and if you check the value for banana for example, it will be 5.

    Now back to your door, you can use only one instance of the door, create an instance variable on it ( I would go for something like "doorNumber"), so each door will have it's number.

    Your dictionary would look like this:

    "door1" 1

    "door2" 0

    "door3" 0

    The key part(left one) you would acess using "door"&Door.doorNumber. // Door would be the actual object, 0 means locked, 1 means unlocked (you can also use strings if you like, "locked"/"unlocked").

    To check if the doors are locked or not, you can use:

    Pick all "Door"> Dictionary, compare key> "door"&doorNumber, if equals 1(or "unlocked") set solid to false.

    Let me know if I can help with something else(please tag me)

  • What seens to be happening is that when any Enemy is in the 2nd frame of the animation, you tell all the enemies to spawn a bullet. Try removing the for each, only the specific enemy which is on frame 2 should spawn the bullet.

  • Think of it like that.

    System> compare variable 'Door_1' > if = 0> door1.solid = true(door locked)

    else door1.solid = false( door unlocked).

    Just do that for all your doors. Have you tried it? What's exactly your problem, isn't it working or you are having trouble making the logic?

  • Check out the templates that comes with Construct2, go to new project and search for templates. You will find alot of usefull stuff there.

  • bump.

    I'll explain my problem, I have a physics puzzle game, and when the player hits the stop button, all the objects go back to it's original position. I save the game whenever the player moves and object.

    What's happening is that when I reload the game(on stop pressed), the music goes back to where it was when I saved game, how can I avoid that?