Prominent's Forum Posts

  • https://www.scirra.com/manual/78/expressions

    They basically express certain things in a quantitative form.

  • check if mouse.x is greater than variableX

    if greater, then set direction to right, else left.

    set variableX to mouse.x

  • Is it possible to show the debugger in a node webkit export?

    My project is at a point where the preview doesn't seem to be working anymore, and I have to export the game to test it out. Just wondering

    try adding the browser plugin, and then create an action on start of layout to execute javascript, and place this into it including the quotes:

    "var gui = require('nw.gui'); 
    var win = gui.Window.get();
    win.showDevTools();"[/code:3i0t4wn1]
  • Yes, I would like a way to handle exceptions too (with ability to change them at runtime too).

  • I think this is a good request- as it serves a purpose. I also wouldn't mind being able to resize the tiles(without resizing the tilesize).

    Things like these are common sense, since anything you can edit in the editor should be adjustable at runtime. If it isn't then that is placing a limitation on the game-designer.

  • You can just create the Ghost object, and the newly created object will be part of the Enemy family.

  • I found an error:

    I get assertion failed: internal error: attempting to set body's angle to NaN: line 52 col 3.

    When I tried to add a dampened rotary joint between to physics objects.

    Both objects had their rotation disabled. I enabled one object's rotation and the error went away.. So maybe it doesn't need fixing since having a rotary joint between objects that shouldn't rotate wouldn't make sense anyways.

    Thought I would mention it though.

  • Isn't the monitor refresh rate different than fps?

    "FPS = Frames per Second = How many distinct images a GPU outputs, per second

    Refresh Rate = Number of times a screen is capable of DISPLAYING, per second"

    Shouldn't the physics simulation run exactly the same if both are running at 60fps, except one monitor is 60Hz while another is 120Hz?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are various ways you can do it. You could set them all stopped, and then pick the objects based on their instance number or some other evaluation, and then start their movement. Or if object is down a certain amount, pick next instance, and start its movement.

    Look into how to pick objects/instances, etc.

  • Use <> instead of !=

    So, GUIbackground.Type<>"Static"

  • Ashley ,

    Is it possible to mark where an instance was created, then skip every event until it gets back to the place is was originally? That way it would have the instances updated, but nothing will have changed, so it can then continue with the new instance. I would imagine that skipping everything would be quicker than having everything check the lists.

  • Maybe start picking from closest to first node?

    here's a bit more experimenting I did: http://1drv.ms/1KJjNL5

    It probably isn't optimized as well as it could be, but it might give you some ideas. There still needs to be a way to prioritize which unit goes first when two or more are competing with each other, but this example has a movement that works better than the previous example.

  • If you create one object that is part of a container, every other object that is a part of the container will have been created at the same time. You won't have an issue where something wasn't created yet, unless I'm misunderstanding your situation.

  • You need to create an order. I think something like this might be a good start.

    You need boolean that will lock the unit from picking. You also need a variable Order. This is for units that player has selected.

    Repeat "selected" count, pick nearest Units to MouseTarget, units boolean Ready = false. Then set that boolean to true and varOrder to loopindex. Now every unit has it's order number, so it might be easier to figure out how to get them pass trough.

    Maybe that will help. Also,have a look at Ro0j example.

    The issue I see with this is that the nearest unit may not be the one that needs to move first.

    Whenever you click to create a path, it removes the previous nodes, so if the units are following the nodes, and you click again in the same location or nearby, the previous nodes disappear and you get one or so nodes at the place where you clicked.

    You would have to store/save/update each path nodes in some way so that they all connect and go to the destination from the perspective of each unit.

    I don't know how much processing would occur to create a path for each unit- but that is one way to ensure each unit has a node to go to (you could put the path-following sprite in a container with the unit so that each unit has a path-following sprite).

    Maybe at that point, you could find which unit has a shorter path, and move them in that order (short to long). If there is any congestion, pause the longer path units that are behind the congested area/unit.

    edit: this is also why I suggest a dijkstra, because those take less processing, and you get data that an unlimited number of units can rely on. I made a dijkstra plugin in the past for something I was working on and I never released it because it wasn't meant for public use. I'd have to clean it up and figure out a way to make it more user friendly.. Maybe I'll do that in the future, but I have other things to focus on.

    Using paths for each unit might be a workable solution, but you would have to test it out.

  • If you move one item in a container, it shouldn't move any others. If it is, then something else is causing it (are they pinned together?).

    When an item in a container is created, it will create all the other items in the container as well. You can create one item, and then create an event: On created, where you can position the other items relatively.