99Instances2Go's Forum Posts

  • If the 'degree of control' means up/down ... you can set the gravity to negative. But i suppose you really want angles.

    Using the plugin you could give each sprite a 'helper object' that gets positioned on a distance and with the right angle. And make one source, the other target, although i dont know if they are personal in the plugin. Dont know if that works.

    Besides that. Using regular physics for that is not really difficult. Dont need vectors. Gravity is just and no more then a force applied every tick. So, if you apply a force under an angle every tick, you created gravity.

  • I suppose that you with 'bug' refer to the bug that you created. Lets walk trough the events.

    Events 2 sets the instance variable 'trigger' for all sprites to "trigger1" when that trigger is touched.

    Events 4 sets the instance variable 'trigger' for all sprites to "trigger2" when that trigger is touched.

    So far ok, and i expect intended.

    Event 6 picks all sprites with instance variable 'trigger' set to "trigger1".

    And due event 2, that are ALWAYS ALL sprites.

    Now in event 7, you say: set sp to Sprite.X>100. That returns 1 or 0. Which is fine.

    But you dont refine the picklist. So to which of all the picked sprites should Sprite.X refer to ?

    Since you have a list of sprites, and you address only one of them, it usually picks the oldest sprite, but in reality this picking is rather arbitrary.

    So in your case, this 'Sprite.X' refers to the sprite with index zero in the picklist, and that sprite sits at x=50.

    The logical expression will therefor ALWAYS return zero, and as a consequence sp is ALWAYS zero.

    The 'trigger once' works as expected.

    The browser log has the same problem. All sprites are picked, which sprite should it log ?

    The for each in event 2 and 4 are not needed. The Sprites are not picked. That makes them un-referenced, and that is the same as a 'pick all'. They get no personal values, so you can set the instance variable 'trigger' for all in one action, without the 'for each' loop.

  • That plugin is a add on the regular physics plugin.

    Just dont use it ?

  • You probably get a 'follow' the guidelines' remark. And i am afraid thats is deservedly.

    I can not reproduce that 'bug' with a project containing only 1 sprite, so, with a project reduced to only the problem. You probably can not too, if you do the same, reduce the project to only the problem.

    I use a 'conditional form' because it always possible (and be-like) that i miss something.

    On the other side, this will happen and is unavoidable (at the moment) when you are scaling an instance that is NOT the first ever created instance of that sprite. AND when 'and play' in step 4 means that there are more instances spawned.

  • Why are you choosing a frame then ?

    Well, animations in the 'chooser' is no problem.

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

    For the actual play character. I would not organise the animations in folders as you do. Even in folders the animations can not have the same name. You end up with, if you want to dynamical access the animations, something like "walk1" .. "walk2" .. "walk3" They are dynamical accessible by "walk"&str(CHAMP) as expression. Still, a burden, easy to make mistakes. And if you replace one 'from source' all the animations (i think) get replaced.

    I would make a different object for each character. Put them in a family. Make them global.

    Before going to the next layout i would spawn the right character on a global layer. Now this character will just be there in every level on the layer with the same name as that global layer in the chooser layout. And keep its instance variables when going to a new layout level.

    Each event in the actual game events will address the family, ofcours. Very easy if you want to add characters later. Just add it to the family.

  • Is ok, but the choosing can be done in only 2 events.

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

  • I can not give you advise on your question, i am not a teacher. So, sorry if i bother you. But.

    This 'I am experienced in programming' can be a real burden. C2 is not that 'pretty intuitive' as you might think after a short glance at it. I would like to advise you to invent a little project and 'script' it in C2. That is a complete other world than following 1 tutorial. You still have months, now.

    Besides that, i have the most respect for .. , and i admire people who teach today's kids.

  • Do me a little favour. I had this 'quirk' a year ago. The screen did not update. Place an (test) object somewhere. Give it animation frames. Loop it. Is the Z order updating fine now (it did back then on me). I suspect that you have not one object moving/animating on screen.

  • Actually a pleasant game with the right dose frustration for having to start over.

  • RobertMKD

    Are the objects on different layers ? Are you using a family ?

  • rexrainbow

    I never got the board plugins working. Always crashing on me. Even that example trows me this error ....

    Uncaught TypeError: this.GetBoard(...).xy2NeighborDir is not a function

    at behaviorProto.Instance.behinstProto.target2dir (Rex_GridMove_behavior.js:211)

    at behaviorProto.Instance.Acts.MoveToLXY (Rex_GridMove_behavior.js:701)

    at Action.run_object (eveng.js:1848)

    at EventBlock.run_actions_and_subevents (eveng.js:931)

    at EventBlock.run (eveng.js:888)

    at Runtime.executeSingleTrigger (preview.js:4949)

    at Runtime.triggerOnSheetForTypeName (preview.js:4868)

    at Runtime.triggerOnSheet (preview.js:4800)

    at Runtime.trigger (preview.js:4777)

    at pluginProto.Instance.instanceProto.onMouseDown (Mouse_plugin.js:127)

    at HTMLDocument.<anonymous> (Mouse_plugin.js:66)

    at HTMLDocument.dispatch (jquery-2.1.1.min.js:3)

    at HTMLDocument.r.handle (jquery-2.1.1.min.js:3)

  • One of many solutions.

    https://www.dropbox.com/s/94yqb9cccw2jo ... .capx?dl=0

    It is important to have only ONE 'for each' / object. Else you gonna hurt performance.

  • You do not have permission to view this post

  • 283 & 285

    You dont pick any EnemyShip in those 2 events. So they are un-referenced, which is the same as a 'pick all'.

    So, they all (each and every one) find a path every second (not that good for performance too) ...

    And, they all (each and every one ) stop when the condition is somehow true.

    System > Compare two values is only a logical condition, it has not 'pick' function.

    You need a 'for each enemy', but then you surely have to bundle 283 & 285 in one 'for each', else you gonna drop performance to turtle walk in the end.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure, you can use a conditional operator like

    player.perk="triforce" ? int((player.dexterity + 10))/5 : 0

    but it should be round( (player.dexterity + 10) /5 ) ?