99Instances2Go's Forum Posts

  • 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

  • I suppose that is a question that you have to ask where the plugin is ?

  • Thanks !, the example of the bridge is good but when you press 1 for breaking the bridge in half, the behavior is strange when it hits the wall is very rigid.

    I guess you could get with the physical library but I meant to do without the library.

    The game is Castlevania of super nes.

    Do you plan to break it up?

    If you dont want to use the Physics Behavior (a behavior like any other behavior to simplify movements) then you can still just program the movements. One by one, event by event.

    I was about to make you an example, but without using behaviours, i am not really interrested.

  • Is it possible to save the data of the inventory with that type of programming? If so how do I go about doing it?

    Yes it possibled. But the easy way will be looping trough the inventory objects and translate theire state to an array. Then store that array. And (looking at where you start from) that is what you wanted to avoid.

  • Thank you very much for sharing the source of this.

  • Example with solid pathfinders avoiding eachother.

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

  • djohoe28 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To use an 'image'.

    Construct's flow looks like a long train with lots of coupled train compartiments lined up.

    Game maker's flow looks like a long road with lots of individual cars lined up.

    For either, the other looks silly.

    Yet, both reach destination, but the time to arrive depends on the traffic load.

    Can you compare them ? Depends on how silly you find the other and on the game type.

  • Things i dont understand (cant run it, cant look at the debugger, just a screenshot)

    Tick 1.

    Right after creation there is a 'find path to PlayerCore' (ofcourse i have no idea what that is, i suppose the player's buildings are clusterd arround the core or something like that). Towers are the targets to find for the turrents. I have no idea if the LOS has obstacles attached.

    Then, (event 16) When enemy has not target, and its not moving on a path, pick the nearest tower to that enemy, and find a path to it. At this moment it is for sure not moving yet. It gets moving in the next event. I have ofcours no idea to know if it has a target. I think not. So right now, that condition is always true. It will never move on a path to the playercore. And now it is allready looking for a new path to the nearest tower.

    Next event you move its found path, when a path is found. But pathfinding takes TIME. If a path is found right now, in the same tick, like 0.00001 seconds after event 16, where it is set to look for a path, it moves on a path to the nearest tower. But, i doubt that this path is found allready. Finding a path takes TIME. How much depends on the complexety of the scene. I would not count on it having a path allready.

    Event 18. When it has a target and it is seeing the tower, stop moving. Can be ignored in this tick. Because i dont think the path is found allready. I also doubt that it has a target, it did't move yet.

    Next tick. Tick 2.

    It is not moving, it has no target (i cant see this, but i think so), so event 16 will let it again find a path to the nearest tower. Its is again calculating a new path. And that will probaly (i dont know how complex your scene is) again not be calculated and be ready for the next event. Where it is supposed to start moving.

    Not moving, so probaly no target.

    Next tick. Tick 3

    All over again.

    Some of this is wild guessing, i have to, it is only a screenshot. It cant be debugged. I cant watch it in action.

    But i hope you understand what i try to say.

    Also.

    Event 13 is a bit tricky. I would make a top event > enemy > 'on creation'. And bring all those actions there. But that is up to you.

    I suppose you use containers.