TheInstance's Recent Forum Activity

  • User spatang_herbdx has already more than 'max_user_connections' active connections [1203]

    An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

    Yooooohooooooooooooo spatang_herbdx raise hand !!!!!

  • Jay,

    i dont "get it" by this. I have seen this bug mentioned like close to 1000 times.

    But i still dont "get it".

    My next target is to learn Platform. Could you explain this bug a little deeper ?

    Not the avoiding, but how it happens.

  • 'fire' is only 1 less then a blink of an eye.

    Its used as a "trigger", its gets reset beck to zero on 2 conditions. And one of those 2 conditions is always true.

    When there is no target selected, and that is inmediatly after the space is pressed.

    or

    When the bullet, fired by the trigger 'fire" is uhh fired, and thats kinda inmediatly after you pressed spacebar too.

    So, in the debugger, when the .cap is running, 99,99999 % of the time that u look at it, fire is set to zero.

    The trigger to 1 is just to fast for the debugger.

    Ofcourse, do not forget that this is a style element.

    I always let the button be pressed uncunditional, i just let pressing the button flow into changing a variable. Later on in the sheet i test the condtion if that variable is conform to the rules of the game.

    Most poeple (those i seen .caps from) make the press of the button conditinal. In this case that would be, test if there is a target, before accepting the key input. And later in the cap they are forced to use a "trigger every" or do some (in my eyes) weird condition to dissalow the bullets coming at a rate like 200 a second.

    I think this lags the user input in big caps. To solve the lag, i see a lot of fire buttons set on "on press the key" and on "holding the key down". And sometimes i see key inputs get burried deep inside a sheet.

    For me this dont feel well.

    I think its important that, moment the player pressed fire, tha thing effective fires.

    Althougt, in paced games you ofcourse need the bullets to keep coming at holding the key pressed.

    Oh forget this, lol .. i guess i sound confusing again.

  • Dude ! lol ... thats for beginners written by a beginner .. lol ...

    Not for a hardcore constructor like you ! .. lol ..

    *smiles*

  • Yup,

    so to decrash ur .cap

    make a new family "Lava"

    Attach it to any object

    and delete it from the object

    fixed here that way

  • is this a help for you ?

  • Look at this.

    It does exactly the same as previous .cap. But with easier pick events.

    You dont see the difference? OK lets walk you trough it.

    Starting in the layout. There is only 1 tank in the layout. 1 base + its turret.

    Both are in the same container.

    You make a container by adding objects to it under the *groups* properties, and deeper *containers*

    Why not name the container, as we name the families ?

    Well that would be definably make containers easier to understand, but limit its possibility.

    What can a container do for you ? It makes picking contained objects easier. Pick 1 object in a container and all objects in the container are marked as picked.

    Lets see this work. Go to the events editor.

    See event 2

    Creating An object thats part of a container will create all the other objects in the container in an urge to keep the container complete.

    As you see there is no action that creates a second turret.

    When you create an object, that object will be marked as "picked"

    Since the Base that we created is part of a container, and in that container is also the Turret, moving Turret will only move the Right turret, the one thats part of the container we just created.

    See event 4

    The loop walks trough the instances of object Base, and sets them picked one by one. But since base is part of a container that also contains a turret. The right turret instance will be set as *picked* too.

    If we can pick the right turret based on picking the right Base, then only Base needs a identification number in a private variable. Turret does not need one no more.

    see event 18

    We pick an instance of Base by comparing one of its private variables to a value.

    The variable is 'call_me', and this variable is holding the identification number for the instances.

    The value is 'selected', a global variable, thats holding the number representing which tank is selected.

    So it states: set the 'selected' base picked.

    But since Base is part of the container that is holding the Turret, also the right Turret will be automatically set as picked.

    So we can do actions for the right Base, and for the right Turret.

    As you see, there is no conditions that tries to pick the right Turret. We have no idea anyway which turret is sitting on top of this Base, because we did not even give the turrets an identification number.

    But the system knows because it knows in which container the Turret is sitting.

    See event 20

    We just picked the right Base, now we have the right Turret picked also. And the action will let the right Turret fire a bullet.

    See event 22.

    We only picked the right Base. Destroying this base will destroy all Turrets in that container.

    As you see there is no action to destroy any turret.

    Convinced to use containers? : )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yeah

  • Maxum ! hope u are not mad for using your sprites in this !

    OK, now. When a beginner gets stuck when starting from a layout as set in previous post,

    he/she usually moves to something similar to this .cap

    Do not take this as an example for good coding, and do not take this as an example for a well done user inter action. Its no more then illustrating this post.

    Well whats the problem you say ? This works as expected !

    Well,

    let me point you to the conditions picking the base and the turret.

    To do something with the thank, you need a condition to pick the Base AND a condition to pick the Turret. To make them move together, die together, get selected together and get unselected together.

    Thats 2 pick conditions for each move in the game. We also have to give the Tank AND the turret a identification number, to be able to pick them by.

    Now this is only a tank with 1 base, and 1 turret. Now imagine a spaceship, with 1 base, 4 turrets, 4 engines and 16 lights.

    That will run out of hand in a blink of an eye.

    On top, it will be more difficult to create more tanks on runtime.

    If you look close at event 25, then you will notice that if you mental figure out what it is doing, that its holding 2 erros.

    But it works, because, there can only be 1 tank target, so moment a bullet gets fired, it will ALWAYS hit the right tank.

    I knew this, but, at the end i let it be.

    Now lets dive in the comfortable and elegant use of containers. Next post coming up soon.

  • forgot instructions dummy

  • ....

  • Slowly moving to the use of containers.

    But, first lets create a situation where we dont have "containers" to use.

    You only realize the comfort of things when they are not available.

    There for.

    Lets do it all wrong first.

    A lot of beginners start a project this way.

    That are 6 different objects. Plz do not ask me to write the events to make this work.

    Thats would be to much.

TheInstance's avatar

TheInstance

Member since 5 May, 2008

None one is following TheInstance yet!

Trophy Case

  • 16-Year Club

Progress

16/44
How to earn trophies