calminthenight's Forum Posts

  • If I were doing this in javascript, i'd have a condition after those two like so:

    if (this.Hovered != this.LastHovered) {

    // Do Stuff

    }

    How would I replicate this comparison as a condition?

    You can use the system condition "evaluate expression" and use variableA=1 & VariableB=1 or any combination of true or false.

    For the boolean state 1 is true & 0 is false.

    **EDIT sorry read to quick. You want Evaluate Expression (A=1 & B=0) | (A=0& B=1) that will give you not equals to for your booleans

  • If it is top down then you would be simulating the speed/direction changes of a hill. Definitely possible

  • I created a demo for you that shows the rope behaviour and also shows you a way you can create measured ropes between two points at runtime (which i think is what you were after?)

    Let me know if you have any questions. There are explanations in the comments.

    1drv.ms/u/s!AkmrWgxeuxlKhIceKJJF1P12bLo9TA

  • Hey that's alright I didn't take it that way at all. To address your questions:

    wouldn't 3 For Each loops be an issue performance wise?

    No is the simple answer. Anything can be a performance issue in right situation. You can certainly measure the performance impacts of opposing ways of doing things if you want to. If you use a for each loop at the top of an event hierarchy then everything in that hierarchy has to be tested for each. If you use multiple for each loops for specific elements of the event hierarchy then only those elements have to be tested for each.

    we're doing lots of picking in this event now. Won't that be an issue performance wise since it has to pick ALL instances then filter through them? Doing that multiple times isn't an issue?

    There are only 5 pick events in the sheet and they are not all always running so I would not call that lots of picking :) The rest is the same as what I wrote in the first answer, anything can be a performance issue.

    Is setting UID to -1 wrong? I am asking because I saw you set it to 999 and I wasn't sure if UID can be set to -1 or not.

    Don't know. Try it! :) I just picked 9999 cause that's what I use. Obviously if you have 10000 UID's then you'd need a different number

    Why did you do the pathfinding this way?

    I assume you're referring to the event that sets the targetX and targetY variables? If so it is so that you do not need to reference or pick the villager again in any subsequent events. The enemy instance always has the variables provided they have a target. For example if you stopped the pathfinding and needed to find a path again, you would need another event that picked the right villager to get the coordinates to.

    You should remember that there are heaps of different ways to achieve this result. This just happens to be the way that I went, it certainly wouldn't be the fastest or most performant because If I spent more time on it I would refine and test vs opposing ways etc. So if performance is an issue for you, what you have is a working system that you can now go and compare against other methods to find the quickest.

    Hope that answers your questions

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, sorry for leaving you high and dry there I had some unexpected work come up.

    I have redone your ranged enemy event sheet to show you how to set up the events for what you wanted.

    **Please do not save over your existing work with as I've deleted some other things just to make it easier for me. You will need to create the instance variables I have created and then copy the event sheet across.

    1drv.ms/u/s!AkmrWgxeuxlKhIcbo9J75qqxC1NPvA

    The majority of your problems were just incorrect picking events and the use of "for Each" in the wrong spots meaning that it would wait for one instance to complete a bunch of stuff before it would move onto the next one.

    See the notes in the project file for more info on what I have done :)

  • Ok. It's too hard to troubleshoot without seeing the project file. Upload it and I'll take a look

  • You can also use the inverted "is on screen" condition

  • An easy solution is to use the scene graph feature and use an invisible disk behind the one you want to rotate. When you first click, the invisible disk rotates to that position, then the main disc is added as a child and it rotates with it. When you release touch, the main dis is removed as a child.

    demo project 1drv.ms/u/s!AkmrWgxeuxlKhIcaXVGrFuPvCSDuoQ

  • In the physics settings you can prevent rotation or use the angular damping factor to adjust the speed at which rotations slow down over time. Have you already tried adjusting these settings?

  • Have you tried disabling the first else event just to see if it is interfering?

    Also is the basicrange.attackspeed a fixed value and is it correctly set on all of your instances?

  • Here I changed it so that they always move towards the next node in sequence and only destroy that node once reached.

    1drv.ms/u/s!AkmrWgxeuxlKhIcXmhbgIJBhseyfCQ

  • Yes I just used on overlap cause it was quick and easy but you could change the destroy condition to be anything you like.

  • You'll want to add an instance variable to the nodes and when they are created pass something like the UID/IID of the blue square to the nodes, then have the pick condition include node.variable=bluesquare.UID/IID

    EDIT: I couldn't understand your events so I have created an alternate event sheet with different variable names and switched to move to behaviour to demonstrate.

    1drv.ms/u/s!AkmrWgxeuxlKhIcV4LyHc4pXO6CSVg

  • When testing the project it never progresses past the the game over screen so there's no way to test what you are wanting to find out.

  • Please post your project file so we can see what you have done. There are many reasons why this could be happening based on how you have implemented it.