99Instances2Go's Forum Posts

  • , 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.

  • Same with a 'non scaled' object.

    https://

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

  • This thing goes round and round, and is never detecting any overlap. Yet it collides like the birds on my windows.

    https://

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

    I apology for taking you for beginner. Now it is your turn, treat as the beginner (that i am).

    Explain the context where it is a problem ? Plz.

  • You can make you own collision polygones. Double click to sprite to acces the image editor. The polygones editor is the last icon in the tools bar. Right click in the graphic field to have more actions.

  • ysvw

    I wanted to give you a simple example, then i got stuck on the rules that dictate when the player dies.

    Only those rules make it a bit complicated. I choosed for: wrong key = natural looking dead.

  • A little bit like this.

    https://

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

  • If it is a bug, both must fail. The only difference is the SOL. And the SOL works as advertized in the manual.

    Also, the second event works, as proven.

    It is, in my opinon, virtual impossable to program c2 in a way that picking from the previous SOL behaves as an or.

    There is therefor ofcours also no OR exception in the manual when the manual explains the way that pick events work.

    Its, on the other hand, possible to add an extra condition to the system dat behaves like the existing 'compare 2 values'. And that could be 'compare if objectx overlaps objecty'. Without, just like the existing 'compares' altering the SOL. Can be done for collisions to.

    But, if that comes to c2, i surely hope someone else will explain the differende between a 'compare if objectx overlaps objecty' and a 'on overlap between objectx overlaps objecty"

  • Ok.

    Explain the difference between the 2 events in this capx, plz.

    https://

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

  • LanieCoder

    https://

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

    Just to let you know that i had fun playing with your concept.

  • About the last capx you placed.

    You always start at the bottom condition, and trace back. Knowing that: a pick condition looks at only the objects in the previous picked list of objects. Unless the list is forgotten. Forgotten is not the same as empty. So. When the list is forgotten you can read in the manual as i linked it for you.

    • The does not work section:

    Starting at the 'cursor is over sprite'. The previous picked list for that condition is made by the 'sprite is not on screen' condition. Al sprites are on screen, so that picked list is empty. Meaning, the 'cursor is over sprite' does not find any sprite in the SOL, and can therefor never be true. There are no referenced or unreferenced objects in the actions section, so we do not have to talk about at that. Althaught thats is mostly the problem. Because since the SOL is empty, no action can ever work on the sprite object.

    • The works section.

    Starting at the 'cursor is over sprite'. That is a new 'top' condition. Or 'root' condition, or how you want to call it. This means that there is no previous picked list. The picked list is forgotten. Not the same as empty !. Just forgotten. So, in fact, it makes its own pick list from scratch, starting from all the sprites again. And in the picklist that it made are all sprites that are overlapped by the cursor included.

    Same for 'sprite is not on screen' in there. It has no previous picked list, because it is a root, a new condition. So it has all the sprites to pick from.

    Dont know how to explain it better to you. I hope i made things a little clear.

    So, basecaly. When you compare 2 'pick condtions' (in an or, or an and, or an else, or in a sub) you have the obvious flag true/false. But besides that, the mutch more importand 'previous SOL'.

    Two things can happen.

    1/ Althaught the flag reads true as you expect it to be, the actions can get an empty SOL, an therefor work, but work on nothing.

    2/ The second (or third, 4th, 5th ....) condition can look for objects that are excluded by the previous picked list. Than the condition will not be true.

    There is one more way for me to state it more clear. When i may say it in my moms language. : )