99Instances2Go's Recent Forum Activity

  • Since you want each trunk to have an personal JapTreeTrunk count, you need to use instance variables.

    https://www.scirra.com/manual/73/instance-variables

    Now you can pick the right tree based on the trees's personal count.

    https://www.scirra.com/manual/124/system-conditions

    (search "pick")

  • Working example:

    https://

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

  • Do you mean that, if you run it in the debugging mode, the variable loopindextest is either =zero or =the end of the loop ?

    Well, yes, it happens in 1 tick. You dont see that loop counting, its is done in less then a blink of an eye. So it or zero, when the condition is not met, or the end of the index when you look at it. It is Schrödinger's cat.

    If it does not loop (from zero to end), then you really need to upload the capx. But, i expect it to loop because you basecaly say that the variable does indeed show the end of the index.

  • Now, but, how did you pick the instances ?

  • You mean this ?

    https://

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

  • Easy Way:

    https://

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

    I wonder how you picked the instance though.

  • , R0J0hound made an exellent example.

    And it is not complicated.

    (edited the link, i accidently gave the report link)

  • ysvw

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Turret has a 'has target' and a 'on target acquired' condition.

    Turret has also the expression 'Sprite.Turret.TargetUID'

    So, ''on target acquired' you can set Sprite.Turret.TargetUID to an instance variable of the turret. You just have to check first if there is no other instance variable of any other turret set with to that UID. Like this:

    System > pick by comparisation > expression = sprite.variable > value = Sprite.Turret.TargetUID > object = sprite.

    Then you check in a sub event if sprite.PickedCount = 0

    If zero, you know there is no other turret with that target.

    Then, to reset that variable to 'zero target', you use the 'has target' condition combined with an else to 'untarget' de variable.

    Attention. The UID zero exist. If you have a sprite with UID zero, you will run into problems, when you set the variable to zero to represent a 'no target'. If you have a sprite combined with a turret with UID zero, then copy it in the layout, keep the copy and delete the original. UID zero is now gone.

  • https://www.scirra.com/manual/78/expressions

    The expressions NodeXAT and NodeYAT get set by the action 'find path'. They are a list of away points.

    To acces that list you first need to know how much waypoints there are. The expression 'Sprite.Pathfinding.NodeCount' gives you that info. Then you have to loop trough the waypoints from 0 to count - 1. And the expression to find the postion of the waypoints will be Sprite.Pathfinding.NodeXAt(loop) and Sprite.Pathfinding.NodeYAt(loop).

    Better:

    https://www.scirra.com/tutorials/1367/a ... -waypoints

    https://www.scirra.com/tutorials/474/pa ... e-of-sight

  • Okay. This is NOT a copy of your layout. The platforms are placed differned. Because. Wel.

    https://

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

    I wanted to show you the difference in performance when you use a tilemap. I put all the platform sprites in 2 tilemaps. A solid and a jumptrue. Before it ran at 20 FPS on my computer. Now it runs at 65 FPS.

    Also, i gave all off screen enemy's a zero timescaling. This is not neccensary. It is just a gimick to lower the collissions/frame even more.

    About Choppy not wanting to turn direction on a collision. Wel, wat you try is tricky.

    You move Choppy with the platform behaviour, wich is fine, but since the barriers are non-solids; the Platform behaviour is pushing Chappy into the barriere. Normaly when u look for collisions you use a way of moving things that have a auto-push-out-of-solids feature. Without that the collision is gone to quick. You cant make the barriere solid, i know that.

    Also, there was a minor picking problem. The chance that 2 choppys needed a direction change at practical the same time was big. But only one got changed.

    In the capx is a very elegant solution. It is a fast one too. How smaller the angle, how smaller the range, how faster. And if you tweak it right, it will never miss. Not even at very high speeds or low framerates. It will change a 1000 choppys in direction at the same time too.

    Hope i helped you some.

  • Its behaves fine with a tilemap too.

    https://

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

    Not that i am happy with the movement, but this is only a simple bullet behaviour riding arround that maze.

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