99Instances2Go's Forum Posts

  • I have to rephrase things. I was only half correct. The flag true/false gets set. Else unreferenced objects would not feel the action, and they do. But. The rules for picking still apply. The SOL is just empty. The action run on a empty SOL.

    https://www.scirra.com/manual/75/how-events-work

  • Do the first condition

    On A "prejump" animation finished :

    set A animation to "jumping"

    Followed by a new condition

    system > compare two values > first value 'A.AnimationName' equal to "jumping" > the set value action

    else > set the value differend

    Assuming that there will be only 1 A playing those animations.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is no false/true case. It just adds or pulls objects on/from a stack. The actions run on the stack.

    The result of a pick condition like 'is overlapping' is not a true or false flag, the result is a list of objects, populated or empty.

  • My opinion (everyone has one) on this is this:

    Since you have to code this differend to make a solid logic, Construct 2 can as wel force you to code this differend. By not allowing an 'OR' when there is a pickcondition in the events.

  • I think you read those conditions the wrong way.

    Maybe you understand this example better:

    https://

    drive.google.com/open?id=0B1SSuCVV8v74YlBUdzI3dzhlQ28

    The thing is. This is not a logic puzzle like the easy if x=4 or if x=5 then do this.

    This is are pick conditions. Its not comparing overlaps. It is making Selected Object Lists. And that is all it does.

    The overlap logic is only in your mind, its is not part of the logic.

    The question with pick condition is always simple: what is in previous Selected Object List. And what did we filter out (or not) in the next pick condition.

    Okay so:

    Sprite is overlapping tiledbackground ...

    1/ if the sprite is overlapping, both sprite and tiledbackground are in the SOL. This made the previous picked SOL for the next pickevent. If now the mouse is not over the background, that background dissapears in the SOL. Simple as that.

    2/ if the sprite is not overlapping the tiledbackground, the SOL is empty, it does not matter what the mouse does, the tiledbackground is just not in the SOL to begin with. Simple as that.

    3/ if the sprite is overlapping, both sprite and tiledbackground are in the SOL. If now the mouse is over the background, that tiledbackground stays in the SOL. And finaly the tiledbackground that is in the SOL gets set invisible. And that is why you see this as an AND event. While it is not.

    There is a BIG difference in logic between pick-events and non-pick-events.

    The only thing that pick-events do is filter previous picked Selected Object Lists. And the previous picked Selected Object List is empty when a new root event is started.

    And that is in 2 sentences all you need to know to make good pick events.

  • I realised later the xml is really small. And that it did not load even when not colliding.

    So there had to be something more beeing wrong. I checked your xml, it is not formatted right.

    Here as it should be:

    https://

    drive.google.com/open?id=0B1SSuCVV8v74NTh6b2EwWUhKejA

    Still, my previuous comments are still valid.

  • I dont understand the logic in your cap.

    On overlap you make the AJAX plugin request a file. But you never wait for the file to end loading. Yeah in the code you do. But in reality, the overlap keeps happening, the instance variable will not change, so the request to load the file will happen again and again before the file is loaded. The event 'on instructions loaded' will never ever trigger.

    This happens because you did not follow the tutorial. Read it all over here: https://www.scirra.com/tutorials/807/ho ... -game-talk

    The basics are simple though.

    1/ Let the AJAX plugin request the file only once in the whole project. Preferable 'on start of layout'.

    2 / Wait for the file to complete loading, only once in the whole project . Preferable in a root event. Assign the data to the XML plugin.

    Now you can ask the XML plugin questions, and it wil answer. It wil keep the data till you change them. No need to asign them over and over again.

  • https://

    drive.google.com/open?id=0B1SSuCVV8v74MUl2cnIySnEyeWs

    it was a bit more then that

  • Seems to me that your collision polygons are messed up. They wiggle (animated) arround the origin.

    Meaning, if you change to another animation it happens that the player is caught up in the solids. The platform does not know that on the moment you change animation. It finds out when you move, in your case, when you jump from idle. Now the platform should be stuck, but it has an automated 'push out of solids' mechanisme. And that is what you see happening. This mechanisme is essential. So ...

    Be more carefull with the collision poligones, when working with animations.

  • (empty space)

  • Why not make frame and HP match ? You can rearange frames in the animation editor. Make a fake frame for the zero. Only ONE animation with its speed on ZERO.

    Then 'on each tick' set frame nr to HP

  • I dont think that the variable is the problem. Instance variables are perfect for this kind of stuff.

    You probaly have a problem with picking the right instances of objects. And maybe with the logic.

    You should post a capx to get good help.

    First: read this https://www.scirra.com/manual/75/how-events-work

    And this wil set you in the right direction:

    Subscribe to Construct videos now
  • Whats the animation speed ?

  • https://

    drive.google.com/open?id=0B1SSuCVV8v74di1BMjdSYnNickE