99Instances2Go's Recent Forum Activity

  • What would one do with the knowledge of the IDD (the index of a certain object in the list of picked objects) when all objects are picked ?

    Certainly when calling a funtion. I suppose the function gets called from a situation where there is certain picked object list. And one wants the IID of that object in that specific list. There is not one correlation between the picked list (and its indexes) in the event with the function call and the picked list in the on function (all and theire indexes when picked all).

    Just pick the instances (or objects with a famely) you want to pick. (make a picklist)

    Run trought them with a for loop

    Pick the instance by its IID (pick nth) = loopcounter

    This instance has an UID, but that is not importand now at this moment yet

    Set an instance variable to the IDD or to the loopindex

    Now you can pick any instance with an UID, its IID is in the instance variable.

  • What granpa says is this: you can only run this once. At the moment it runs every tick.

    The events (roughtly) run top down. When it comes to the end, it starts again at the top. One time top down = 1 tick.

    So, your creation block runs once, the system starts again on top, it runs again (making more objects), it runs again and again and again, in fact it never stops.

    One way to make that event run only once is to make an 'on start of layout condition' (under system) and bring whole that creation blok as a subevent under that 'on start of layout'.

    An other way is to make a 'Trigger once while true" condition. And bring whole that creation blok as a subevent under that.

  • First Question.

    The preview on the PC, what is the adres in the adresbar ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well besides that, you can pick arrays as any other object. You can also give an array an instance variable to identify it, as you do with other objects.

  • Because they have the animation speed set to zero in the sprite-animation-editor.

    And they use a dedicated sprite with 1 frame of all the items.

    If your animations keep gooing after you told them to stop, then you are including the inventorum events sheet into a game sheet where you tell them to animate, or something close to that.

  • B4 you set the the animation frame. You just stop the animation. Its an action under sprite ... section animations .. stop.

    Event 95.

  • First of all we talk about html5. En that is still not the most performant and brilliant engine on the world. But, it works in all browsers. If you choose for Construct you choose for html5. I suppose that did not yet dawn to you.

    Constuct is no more then a UI to write html5 code. Scirra did not make html5. But they do their best to adress all the inperfections of html5. One of those is performance. This is why you find choices all over Construct. A choice to do it 'that way' to keep it performant.

    Only one obstacle map is one of those choices. So if you have 100 solids (if you choose for solids) running arround, rebuilding the obstacle map for one rebuilds the obstacle map for all. Hence, if the one thats supposed to find a path is an obstacle too, it will not find a path. If you had read the manual, you would have known this.

    Next. The pathfinding behavior finds paths. Thats all. It avoids obstacles based on the gridsize and the cellsize you gave it. It does not know how big your sprite is. It is just what it is meant to be, an easy help for finding paths.

    Not happy with it? No problem. Build your own pathfinding. You can find exellent examples on this forum. Yet none of them will account for the size of the pathfinding sprites.

    If you think that pathfinding combined with physcis and ray tracing should be a basic option in a html5 engine, then let me ask you: why is that plugin not made yet ? There are plugins for almost everything.

    I gave 1 example. And it is a complete AI. The logic that answers your question is in there in 1 event. I cant show the funtion of a steer when i cant build wheels under it.

    I am sorry it did not meet your lazy expectation.

    But i did not earn that sneer. No one did.

  • When CurX >23 ... give it a new tx so it starts drawing on the x position of the first arsenal.

    The array must be (on the X-as) bags + arsenals width.

    Place in the array on x=0 to x=23 will then be the bags.

    Place in the array on x=24 to x=.... will then be the arsenals.

    The array is zero based.

  • Thylacine

    Pixel shows you how to store variables in the local store. Wich is fine. There are tutorials enough about how to use the Local Storage. And frankly, this is very easy to learn. And you will when you are ready for that.

    Just consider that the gamelogic in the given example needs only 1 variable to make the choosen weapens work. The variable 'BulletPower'. You can not choose a gun during play, the player is not holding sprites that represent a gun, there are not squads that have to be made, equiped, ... etc.

    Looking at the grafical representation of your inventory, you have bigger plans. Looking at the code, you are just filling a inventory, without building a database that can actual be used later in the gameplay.

    The arrays, you should use, have not as main function to fill up the inventory. They are essential in the actual gameplay. In fact, the inventory is just and no more then a grafical representation of the actors in the game.

    They just happen to be easy to get stored in the Local Storage.

  • ***

    Is this the logic that you was looking for ?

    https://drive.google.com/open?id=0B1SSu ... DQ3MXNMUFE

    There are 3 major things you have to deal with.

    1/ there is only one obstaclemap for all

    2/ find a path & calculate obstacle maps take time

    3/ the calculated obstacle map is available in the NEX tick

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