nimos100's Recent Forum Activity

  • Aha! I thought it would be something like this, thanks. One thing - I can't seem to find the "Pick nearest " action in the Pick section. Am I missing something?

    Its an object functionality not a system one, and its actually called "Pick Nearest/Furthest" you can find it under the section Size & Position

  • nimos100 have you seen this tutorial?

    https://www.scirra.com/tutorials/1118/path-finding

    Not really sure what that solves, I assume you mean using path finding without obstacle map? but that pretty much ruins the whole purpose of it? Because in that example the path finding is just used to move a unit to the castle and stop when it hits it. But what if there are 5 castle behind each other and you want the guard to go to castle 4, then it will hit castle 1-3 and stop? But how would you make it move around the castle, if there are no obstacle map?

    This is not a self created problem and since the OP is really old back when C2 was r182, and I haven't heard or seen any updates that solves this problem and someone not long ago posted the same issue which made this old post appear again <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> I assume that the problem still exist.

    As stated earlier in this post I made a bug report and Ashley answered the following.

    [quote:18u42xvi]The problem is there is only one global obstacle map used for the pathfinding behavior. Everything pathfinds on the same map. So if you have object A with two obstacle types, and object B with no obstacle types, you have a conflict: should the one global map have those objects as obstacles, or not? In this case it happens to pick the global map where no obstacle types are defined. If you delete the red object there's no conflict any more and it uses the right obstacles.

    I'm not sure how to resolve this - having multiple maps becomes memory inefficient and possibly slower, but on the other hand perhaps the obstacle types should be global as well to avoid this situation... the easiest thing to do is to make sure you have the same obstacles added for every object using the pathfinding behavior.

    And again unless this have been fixed without me knowing I don't think it have been solved.

  • Hello!

    I recently started playing around with Construct 2 and I have some little experimental thing going where I have AI Pathfinding units that chop down trees and bring the wood back to store it.

    Currently all my units will go to the same tree and the one that gets there first will chop it down, the rest of the units that went to the tree are beaten to the task by the first unit and get confused. How do I make the Pathfinding AI units go to the closest tree that doesn't already have a unit on the way to it? I basically want to have a unit call dibs on a tree/object and then have the other units know that it is taken and go elsewhere.

    Thanks for any help you can give!

    You almost answered you own question A way to do it is to mark the tree as "occupied" the moment a worker "select" it.

    For each Worker
    Tree.Occupied = False
    Pick nearest Tree to worker
    ----> <If Tree found> 
    ----> Tree.Occupied = True 
    ----> Worker.Go to tree
    [/code:3b0gfoir]
  • if I have two big objects collide is there a way to get the X,Y coordinates of where these two objects are hitting, or overlapping so I can add an effect there? like collision X, y ?

    or maybe there are some behaviors that can track collision points?

    Edit: or get nearest image point, or anything like this?

    If your objects are the same size, this can easily be calculated like this.

    And if they are different sizes you can probably add some math magic and calculate that as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not anything I've messed withthis , but if I understand your problem...defining the other sprite as an obstacle and refreshing around each every x seconds should work...or so I would think. Both sprites much be obstacles respectively. I've been running multiple copies of the same sprite and defining hits on overlap...works fine and kinda the same issue. Just havta be careful not to refresh the whole thing each time or you'll run at negative fps lol

    It shouldn't matter whether you keep refreshing the obstacle map as there are only one. Besides that if you refresh it constantly you will most likely ruin performance.

    The problem occurs as each units might need to have different obstacles. Like a ship, plane and car.

  • Hi can this be done?

    Play audio from a folder on disk. (Node webkit)

    I want the music in my game to be loaded that way.

    Kind Regards.

    Savvy001

    Shows how to do it.

  • nimos100 Thank you for your time and help.

    To confirm, this DID work for you and you were able to PLAY audio files that were sitting on your "local C: hard drive" and NOT the "sounds" folder within C2, correct?

    I tried this exactly, but was not able to make your workaround work, even for files sitting on my local C drive. I followed your example exactly as described. Do you think that you can share a simple .CAPX, just to see if i missed something.

    Thank you in advanced for your continued assistance...

    nimos100 & Animate

    i tried the example as well without success .... a sample .CAPX would be a huge help!

    thanks!!!

    -Rik

    Here is an example that will let you load and play an audio file from your computer.

    Capx:

    https://dl.dropboxusercontent.com/u/109921357/Play%20sound%20file%20from%20disk/Play_sound.capx

  • Hi,

    I have a question about creating objects and then triggernig On Created. Basically, if have different enemies, all in one family, if let's say I create enemy10 will then On Family Enemies created will work for that particular object? And what if I create number of different enemies at the same time? Thx

    All objects that are part of the family will trigger both there object and family On created event. Since "On created" is a trigger it will trigger for each object so this shouldn't be a problem if you spawn more at the same time, as they will be handled individually.

    The priority of triggering the "On created" is object first then family. So family settings will overwrite the object settings.

  • Ok, do you know another way to do the same thing?

    From what I understand you are trying to make it so every time the mouse cursor moves over one of the sprites they switch place right?

    Here is an example of how you could do it. I haven't used any families etc. to keep it simple:

    Each sprite have a Boolean variable called "Active" and only when this is true the switch will take place and will be switch for each of the sprites when the mouse cursor is not over them to avoid them flashing.

    Capx:

    https://dl.dropboxusercontent.com/u/109921357/Sprite_switch/Sprite_switch.capx

  • You have to remember that the "Else" is linked/based on the former event. Which means that as long as mouse cursor is not over sprite8, the "Else" will trigger true. So your code switches between "Mouse cursor over sprite8" being true, which moves sprite8 to 2000,2000 and then the next tick the "Else" will be true moving it back again. Which explain why you see it flicker or flashing.

  • imgur . com /py7PPIR

    The link doesn't show anything, even when spaces are removed.

  • Sorry (maybe a bit slow today) but doesn't the manual state that after setting the source the video would be paused and would need the 'Play' action to start it?

    [quote:2zgxklw1]Set source

    Set a different video file to play. As with the object properties, three formats can be specified. Setting the source does not automatically start playing the video; use the Play action to start it after changing the source.

    So wouldn't this mean it's working correctly?

    No, it means that the manual is not very precise or correct regarding this

    Because it doesn't matter whether you change source or not. If Autoplay is set to "Yes" it will play whenever a source is set.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies