santiagoestrade's Recent Forum Activity

  • How do you want the tweening to start? It needs to have a proper one-time trigger, so if you have something like a system comparison (when a variable = X number or something like that), it won't work.

    A simple workaround is to set a function. You say:

    - system compare VAR = number >

    > call function "TweenStart" (sprite.UID)

    - On "TweenStart" >

    - pick Sprite by UID = function.param(0)

    > Tween one property (size or scale, I don't remember) in 8 seconds

    It needn't be a variable check. Anything that you need to start the scaling and is not a trigger, call a function in between :p to make it a trigger.

    In case you have more than one instance, then you will need to pass its UID as a parameter to the function to retrieve it and pick the right one at tweening.

    Maybe it is not your case, but I run into a similar issue these days when switching from old C2 Rex MoveTo to new shiny built-in Tween. Sprites didn't start moving at all. And then noticed this.

  • dop2000

    I'm no senior but remember Ashely explaining picking at some post regarding loops, arrays, picking and tokenat. He said picking always act as a loop. Runtime checks condition for every instance to see if that instance meet the criteria. The issue here seems to be that the expression choose() is rrseted for every isntance checking. One would expect that at the beginning of the event, it chosed a number and compared that 'now-constant' number for every instance. But it chooses a new number for every instance, because it runs the entire condition from the start for each instance, not just from choose(). Which is kinda weird, given the expression box at a very primitive level is meant for fixed strings or numbers, so my logic also tells me it should treat the expression as a variable to call from at the beginning of the action-function.

    I am no programmer, but recalling his words about it, the whole picking system works like that at a core level, so it is not likely to change in a near future, as it would imply the same code rewriting many SDK folks have complained about C3 runtime.

    I think here the only way is the typical workaround of setting the VAR in advance, as you indeed had tought me in other posts in the past.

    BTW, a bit odd to see you around asking things, instead of solving them :p

    Have a nice year!

  • You could give them bullet behaviour. It has a property called 'Bounce off solids'. It might fit, depending on how much you want the light to overlap. You could set the collision box to a minimum.

  • I'm not pretty sure whether I could be talking nonsense, but I think the issue is you are making player the object condition for the zombie animation.

    If you say compare if player is X then zombie do something, runtime doesn't know which zombie to pick. If there is just one zombie at a time it doesn't matter, yet if there are more... That would be why it doesn't recognize right or left, for it gets confuses about which zombie to reference. The main event where the check sub-event comes from is even an everytick.

    The expression for checking distance/position in the expression box is just a system comparison, either true or false. It is not picking the zombie from the expression, but the player. Be the condition referenced to the zombie object and then into the expression box, distance from zombie to the player, the right one would be picked. As to say:

    - System Compare Zombie (expression: distance to player, position...) >

    > Zombie set animation to Zombie.Animation

    Forgive me in advanced if I am unnecessarily messing and you already took that into notice or solved by other means of picking. I only say becaise recently I had the same issue regarding path lines which didn't properly aim to their own troop for they were not correctly picked and was creating a domino-like chain effect from a fore event. After using line objects to check the events, rather than troop object, it all started to work right away.

  • I even found a more elegant solution than sub-events with Else. Given there are just two options, a ternary operator does the job with just one line of code:

    - On double tap gesture on Troop >

    > Call function ( Troop.UID = ActiveTroop ? "DropTroop" : "PickTroop" ) (Troop.UID)

    I eventually managed to find the post from the forum I read it from and then ended up here:

    construct.net/en/make-games/manuals/construct-3/project-primitives/events/expressions

  • I am up to a board strategy game. The way I want its controls to be is- when I double tap a troop that is not active, it gets enabled. When I double tap an already active troop, it gets disabled.

    But it's giving me some trouble and I can't figure it out, for the manner I have handled it, at double tapping troop, it gets first activated and them deactivaed. Or viceversa. It all depends on the order of the events.

    If I place first the activate event, it triggers for a non active troop, thus it being active for the time the next deactivate event takes place. So it recognizes it as active and disables it.

    If I swap the order, it deactivates and then recognizes it being non active and activates it. So it is always a loop.

    I need it to check the first event (troop being active or inactive, doesn't matter), and be it true, trigger skipping the next event-block. Only when being false the first event-block, it would step on to the next event-block. Otherwise, doesn't take it into account.

    1drv.ms/u/s!AojCIgmN1VlPgYVKToDc8b5aVFaRkQ

    I must be missing something pretty basic. Remember vaguely having read something about it somewhere around 'if, else, run once...', 'how events work' or maybe on the loops section, but I cannot find any reference now there nor the forum.

    edit- nevermind, it was 'else' that I tried but had put it on the main triggering condition. Now in the sub-event is properly working as expected. Rookie fail...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anyway, my issue was not being able to calculate distance. I had indeed on the event sheet to demonstrate it started recognizing dragging the very moment you touch the object. The problem was that it worked that way. But with your tip, it's simple enough. You saved my day!

  • Oh God! Why I didn't come to that by myself? You're right. As simple as per scrolling (touchEnd against touchStart). Checking distance between touches. Comparing arrow position with troop position for triggering might fit as well.

    I have just fixed the sample capx with both options. I'll work with them on my full project to see which takes less code to make stable.

    Refering to touch position implies using at least 4 variables, 2 of them being updated every tick while dragging. Refering to arrow&troop may create some conflict at picking among all troops and arrows around though. Yet simple to work around with sub-events and function parameters.

  • I am developing a board strategy game, where turn by turn, each player chooses a troop and aims to a tile. Then an arrow shows up towards that tile.

    My issue is I want to make the aiming by drag. But, if I use condition 'on drag start', as the manual says, it is triggered by a tap or touch, without actually comparing whether the object moves or not. The point is that I have also tried with 'is dragging' and surprisingly, it neither compares movement. So I have no way of making a condition that triggers if one drags the object at least some pixels, but doesn't trigger if one just tap it.

    Has anyone some clue of how to work around that?

    1drv.ms/u/s!AojCIgmN1VlPgYVGFDQ-kKJxZ9TKwQ

    I have an example capx where you can see the starting position of the sprite and the 'triggering' position of it until runtime recognizes it being dragged. Distance before dragging triggers is always 0!!! So 'on drag start' is exactly the same as 'os dragging', for they both get triggered with just a touch or tap. I know one is a trigger by itself and the other is a cpntinuous condition. But, is there a way to triggere something after the dragging has been of at least a few pixels, so a tap wouldn't trigger it as well?

    must add-

    when aiming to a tile, the line of the arrow repositions and changes width and angle according too the troop while dragging, so I need a work around that fits both for one-time triggering and continuously comparing.

    I need to make a 'repeat once' event that triggers at start of drag to activate the troop and reveal the arrow, and another event that keeps repositioning and widening the arrow while dragging.

    1drv.ms/u/s!AojCIgmN1VlPgYVHm4cdRPpOH6ACKA

    Here is a capx more similar to what I intend to do. Actually, the real one has a tilemap with every position value being translated to tiles, lots of functions passing objects as parameters and a simple boolean-toggling turn system to make each player is allowed to aim with only one troop at a given turn. At the end of the round -when each player has aimed or skipped every troop- they move, shoot and fight all at once.

  • Bug reported

  • You are right. On previous releases it keeps working on mobile. The point is I cannot load now my entire project for I saved it and now it says it is a future C3 release project and cannot be opened with previous versions any more!!!!!

    I hope this is being repaired soon, since it could mean losing months of work...

    Did you already post the bug? I'll do this very day if not. Tried even with an empty project to avoid been told it is because some addons or some setup or things alike. So now I can tell it is totally a bug.

  • I've been struggling with the same issue. Tried on Huawei Nova, Samsung Galaxy S6, Samsung Galaxy S9, Samsung Tab A, Sony Xperia ZX and neither reacted to touch. Indeed, it's quite strange, because nothing ibside the layout can be tapped, but outside it lets you double tap for adding an object. Though one cannot select the object once the instance is onto the layout. It is not possible even to scroll the screen.

    Jean-PaulL

    Did you manage to post the bug report? Did you get some feedback?

santiagoestrade's avatar

santiagoestrade

Member since 25 Mar, 2016

None one is following santiagoestrade yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies