nimos100's Forum Posts

  • The original video was way to big to upload, so I did something brave and against all odds and tested it with a completely different video file and can hardly believe it my self, but I managed to reproduce it!!!

    Anyway, the video file is a gift to you, so whenever someone report a problem that require you to use a video file, you are very welcome to use that one for testing purposes, that way you always have one when you need one for testing.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Video_bug_2/Video_bug_2.rar

    [quote:10vzg4v4]Problem Description

    If a video is playing and you destroy it, it will keep playing the sound in the background. Also if you delete the file from the disk it will not be deleted, until you close down the application or the video reaches the end.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Video_bug_2/Video_bug_2.rar

    Description of Capx

    Play a video and destroy the element and delete the file from the disk.

    Steps to Reproduce Bug

    • 1. Add a path to a Webm file and press Load and play video.
    • 2. When the video is playing press the Destroy video and delete file button.

    (A workaround is the set the video playtime to its duration before deleting.)

    Observed Result

    Video object is destroyed. But file is not deleted and audio keep playing.

    Expected Result

    That the video was deleted, audio stopped and file was deleted from the disk.

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Tested with NWjs 0.12.0

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r205

    [quote:10vzg4v4]Closing, please make sure your bug reports are reproducible (this means including the video file you used - I cannot reproduce what you are doing without it)

  • Update:

    Resetting the dialogs in C2 under preferences seems to have solved it. However will leave the bug report as it might be worth having a look at.

  • Problem Description

    C2 Action and event window bugged after changing windows screen resolution. These are the only menus that are affected all others seems fine. However not sure how to solve it, as I have tried to reinstall C2, reinstall graphic drivers and restart the computer. But the problem is still there and happens in all projects, whether they are completely new and empty or not.

    See screenshots:

    Attach a Capx

    Happens to all projects, so the attached Capx is just completely empty.

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

    Description of Capx

    Nothing, its the C2 add event and add action menu.

    Steps to Reproduce Bug

    Changed screen size in windows and changed it back to what it was original. Open the action window in C2 and it was messed up.

    Observed Result

    Buttons and text are out of place and the buttons (Next, Back and Cancel) doesn't react when pressed, its still possible to double click the System icon.

    Expected Result

    That the C2 UI was working correctly.

    Affected Browsers

    Related to C2

    Operating System and Service Pack

    Windows 7 sp1 and newest graphic drivers.

    Construct 2 Version ID

    r205.2

  • The bug seems to be related to WebGL. I have tried tot turn that option on/off on my laptop.

    Also reported a problem regarding weird behaviour with WebGL here: https://www.scirra.com/forum/203-textbox-bug_t129744 even though its of a different kind, it is also related to WebGL, seems like there is something wrong with it. But anyway, it was also closed without being solved.

  • nimos From what I've read the library doesn't handle large files very well due to memory implications. I'd suggest using multiple archives as a possible work around for now. When you're adding new files it can bog, since everything synchronous. If it hangs for you, maybe you could wait a tick or two after adding each file.

    That's a shame, the problem is not really the amount of archives, because even if I add only 1 large file (60+ mb not sure what the limit is) it will end up closing the program, I have already tried to give it time to archive the file, but doesn't make any difference.

    As mentioned earlier I don't know before hand the file sizes or amount of files needed to be archived as these are added by the one using the program, so files can be anything from a few KB to GB. So its more or less a "Do or die" situation, if it can't handle all file sizes, it of course will cause the program to crash at some point and therefore not a valid solution.

    But ill keep an eye on it, as I think its a really cool plugin you have made and hopefully someone will fix the library so it can handle large files.

  • I seem to have encountered another problem.

    Everything seemed to worked fine, I was adding a lot of small files to the archive, but when I tried adding some larger files (60 mb and 180 mb) it seems to stall and eventually the program closes without any error message or anything.

    Since the amount of files I need to add to the archive is unknown and of unknown sizes when Its created, I use lists to hold the different path to the files that it needs to add and when a file have been added I remove it from the list, which works fine with small files, but with the big files it doesn't.

    Was wondering if you have experience this problem or know how to solve it as im not sure what to do, when the program just closes and works fine with the small files?

    Is there a way to make the archive wait adding new files until the current one is completed? Or test whether a file was successful added, there is the action called "Archive has file", but guess that is only useful if I have actually saved the archive to the disk, but it closes before I can invoke download?

  • You have the option to check whether a Cell is an obstacle or not using the path finding. So you could use that for checking.

    You also have the option to regenerate obstacle map around certain objects, might be useful as well.

    The cell size is based on the settings in the path finding. So if cell size is set to 30 each cell will be 30x30 pixel so you could use this information to make a functionality to check cells around the object.

  • Problem Description

    If a video is playing and you destroy it, it will keep playing the sound in the background. Also if you delete the file from the disk it will not be deleted, until you close down the application or the video reaches the end.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Video%20problem/Video_bug.capx

    Description of Capx

    Play a video and destroy the element and delete the file from the disk.

    Steps to Reproduce Bug

    • 1. Add a path to a Webm file and press Load and play video.
    • 2. When the video is playing press the Destroy video and delete file button.

    (A workaround is the set the video playtime to its duration before deleting.)

    Observed Result

    Video object is destroyed. But file is not deleted and audio keep playing.

    Expected Result

    That the video was deleted, audio stopped and file was deleted from the disk.

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Tested with NWjs 0.12.0

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r205

  • You can do that with the distance function

    //Check for nearby enemies
    Turret_A.In_combat = False                                             (Only Turret_A's that are not in combat)
    For each Turret_A
        Distance(Turret_A.X, Turret_A.Y, Turret_E.X, Turret_E.Y) <= 500
                   Turret_A.Go_to_Turret_B = False                     (Variable to make sure that turret don't go towards B)
                   Turret_A.Attack_Turret_E = Turret_E.UID       (Store the UID of Turret_E that A is attacking) 
                   Turret_A find path to (Turret_E.X, Turret_E.Y)
    
    (If Turrent_E is stationary you don't have to keep finding a path to it, so you could add a variable to make sure of that.)
    
    //Move Turret_A
    On path found Turret_A          
                    Turret_A.Move along path
    
    //Turret A is attacking Turret_E
    Turret_A.Attack_Turret_E != -1                                             (Only pick A's that have a target)
    For each Turret_A
           Turret_E.UID = Turret_A.Attack_Turret_E                     (Pick correct Turret_E)
           Distance(Turret_A.X, Turret_A.Y, Turret_E.X, Turret_E.Y) <= Firing_range
           Turret_A.stop
           Turret_A.In_combat = true                                      (Makes sure that Turret_A wont keep looking for path to E or B) 
    
    //When Turret A destroys E
    Turret_E.Destroyed
          Turret_A.Attack_Turret_E  = Turret_E.UID              (Select all Turret_A that have the destroyed E as target)
          For each Turret_A       
               Set Turret_A.Attack_Turret_E = -1                       (Reset so there are no target selected)
               Turret_A.In_combat = False
          
    //Return to going to B
    Turret_A.In_Combat = False
    Turret_A.Go_to_B = False
    For each Turret_A
           Turret_A Find path to (Turret_B.X, Turret_B.Y)
           Turret_A.Go_to_B = True                                         (Make sure that it doesn't keep looking for a path) 
    [/code:t0bgh4jm]
    
    Minor adjustments might be needed, but I think it would work.
  • Cheers Noncentz it seems to work now, most excellent

  • Great plugin, however I have some problems, that I hope you can help me with.

    I try to add an image to the archive, but cant seem to make it work.

    The archive gets created but is empty, is there are way to add files to the archives that are already on the disk? I have tried some of the others like add file, both binary and the base64, but with no luck.

    Is what im trying to do possible or ain't I suppose to use Add image like that?

    Thanks

  • Assume you are referring to something like selecting units in a RTS game or something?

    Single sprite

    If that's the case the easiest way to do it I think. (Of course depending if you are using multiple selection or just one at the time) But if you just need to select between different sprites, I would use a variable called "Selected_sprite_UID" and here you store the UID of a sprite when you click it for instant.

    And then you always use this variable when you need to work with a sprite so you avoid suddenly picking wrong sprites. Since it can only hold one UID at the time, it will make certain of that.

    For deselecting you can for instant do like this:

    On mouse Right click
    Set Selected_sprite_UID = -1
    [/code:1pfuv83w] 
    Since an object can never have a negative UID that will work fine.
    
    [b]Multiple selection[/b]
    If you are aiming for multiple selection, you can add a Boolean variable to your sprites called "Selected = False"
    
    [code:1pfuv83w]
    On Mouse Left click on Sprite
         Set Sprite.Selected = True
    [/code:1pfuv83w]
    
    Then when you need to do something with them.
    [code:1pfuv83w]
    Sprite.Selected = True
    For each Sprite
          <Do something>
    [/code:1pfuv83w]
    
    Deselecting them:
    [code:1pfuv83w]
    On Mouse right click
    Sprite.Selected = True
         Set Sprite.Selected = False
    [/code:1pfuv83w]
    
    [b]Selection box[/b]
    If you need a Selection box, you can do that with a 9-Patch
    [code:1pfuv83w]
    9-patch overlapping Sprite
         Set Sprite.Selected = True
    [/code:1pfuv83w]
    
    Deselecting is done the same way as with multiple selection.
    
    To make a working selection box there are some tutorials to make it scale with the mouse as you drag in the tutorial section if I remember correct. However its not that difficult to make.
  • Are you sure that the For loop "Y" from 0 - 1 is not on the top level so it keeps looping, ain't it suppose to be under the On start of layout? or is it already that in the code?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you store the number in a variable for your sprite then you can do it like this.

    For each Sprite
          System create object Text (Sprite.X, Sprite.Y)
          Set Text.text = Sprite.Number
    [/code:329r6p75]
    
    If you have them in an array you can do it more or less the same way, you just need to get the number from the array instead.
  • Yeah, its the same.

    just updated to latest version of NWjs and to r204.2.

    However it seems to be connected to WebGL. If I set "Enable WebGL = off" the bug goes away and the letter is shown correctly. But with it enabled it cuts off some of the left side of the capital W.

    (Not sure, but I wrote a Textbox in the original bug report, but it should have been a Text object, in case you didn't download the Capx)