99Instances2Go's Recent Forum Activity

  • Or trow you capx, i (or some one else will modify it), or try to understand.

    When the animation frame = frame 8, you want it to spawn an arrow. But.

    Your animation will not change a frame each tick. Because the speed of the animation is lower than the speed of ticks / second. A tick is the time it takes for al events to run once. On a fast computer that happens 120 times in 1 second. But if your animation is set to 20 frame changes (animation speed) in 1 second, each frame will be on screen for 6 ticks. (120 / 20)

    Meaning, frame 8 will be on screen for 6 ticks. Or, that condition frame = 8 will be true for 6 ticks. Or, that event will be true 6 times in a row. So it spawns 6 arrows.

    Solve it this way. Right click on that event containing that condition frame = 8, choose "add another condtion' from the list that pops up. Double click 'system'. Look for 'Trigger once while true'.

    Now you have an event with two conditions. The 'Trigger once while true' will fire the arrow only the first time frame = 8. All other 5 times it will not fire, hence only one time when it is true.

  • blackhornet , so you can't pick UID by one group and alter by another. Felt like it shouldn't make any difference, since an UID is always same no matter what family the object is in. Oh well... back to the drawing board.

    So if you filter out (is on screen, is moving) ONE object in group 1, and you feed the UID of that one object to the function, then all you got to do in the function is pick by comparisation > object = group 1 or 2 (does not matter) expression = group.UID ... value is the parameter .. operator ><. And do your stuff in the actions. Because all but that one with that UID will be in the picklist in the function. A function ALWAYS starts picking from scratch.

    But, i suppose 'is on screen & is moving" does not pick ONE object, but a bunch of objects. So in the picklist there are more objects. Looping trough those and it feed them one by one to the function will not solve it. Because the first index in the loop will select other objects then the next index in the loop, and in the end you see only what happend compared to the last object in that bunch of objects.

    The solution here is not use a function. But think the other way arround. Pick straight.

    Condition > invert the 'on screen'

    Condition > invert the 'is moving'

    Now you have everything picked that you wanted to pick. Do your stuff in actions.

  • Not sure why you want all diff. objects for those texts, instead of instances. That can give you troubles later on.

    But, here goes.

    https://drive.google.com/open?id=0B1SSu ... ElfaFA3azA

  • Dude, they told you. Use 'trigger once while true'. Why ?

    Your animation is not playing at 1 frame/tick. On my computer that would be 120 frames/second. I guess it is playing at 10 frames a second.

    So when you say... If animationframe = 8. That animation = 8 for several ticks in a row. And each tick this frame = 8, an arrow gets spawned, exactly as you ask it to do.

    Use 'trigger once while true' in that event, as they told you.

    And that animated gif is superannoying.

  • In your last post, that should set each sprite that is less then 50px away from each other opaque.

    That works if the sprites in the layout are far away from eachother, creating the illusion that those that are close to the one that is locked to the mouse are picked.

    That works if that was what you intented to do.

  • In the first attempt, you locked the first created sprite to the mouse. Then you looped trough all sprites, and feeded all those to the function.

    The function is a NEW TOP-EVENT, so it forgets (by design, and luckely so) any previous picked lists. So the function picks out of all sprites those that that have a differend UID then those you feeded to the function. And yes, including the one you locked to the mouse. But also all others. Then loops trough them, and compares the distance. As a result they kinda flip-flop. In one loop one gets set 50 % opaque, in the next loop that same one gets back to 100 %. You needed to compare to only that one that you locked to the mouse.

    In the second attempt. The for each runs on each member of the family, because there is no previous picked list. There is also no previous picked list for Sprite. So it picks out of all sprites those that dont have the same UID. Wich is just all of them. So basecaly it runs trought all family members and for each famely member it runs trough all sprites. If you have 100 sprites, that would be a loop that counts 100 * 100 times. Again creating some flip-flop thing.

    Here is a working example. I used drag and drop to be able to explore more situations.

    https://drive.google.com/open?id=0B1SSu ... HUydDNQcmM

    As you see i feed to the function only the postion of ONE sprite. In the function i pick all but that one sprite. Then i compare the distance of those only one time against the position of that one sprite.

  • Thinking it trough. Even better would be ...

    End index should be max(0,Touch.TouchCount - 1)

    To not allow the loop to count from zero to - 1. This is only to have it even more performant. Not dooing this will not create an error.

    Also, you have to decide if a 3th touch is allowed.

    If not, you need to add a system > compare 2 values > Touch.TouchCount <= 2.

    Touch.TouchCount is the expression that returns the amount of touches on the screen.

  • System > For (loop)

    Repeat the event a number of times, using an index variable over a range of values. The index can be retrieved with the LoopIndex system expression and passing the name of the loop.

  • Depending on how many steps this circular bar needs to show (if not to many), it can be done without plugins. Just use an animation. 100 frames is no problem. And that is every 3,6 degrees.

  • If not, just ask, there are csv specialists in here (not me yet).

  • The easy way to handle multitouch. Just accept that there is a accessible list of touches.

    A list you handle the same way as every list.

    https://www.dropbox.com/s/875fodjn39q03 ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you place it in the project map, using Windows?

    Or did you rightclick 'files' (on the right) in Construct and choosed to 'import' ?

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies