randomly's Forum Posts

  • If I understand you correctly, you want to save your maps to the desktop, right?

    If that is the case and since you are on Windows anyways (and not a mobile device), I recommend using the NW.js plugin with which you can save files directly to a location that you specify.

    The LocalStorage plugin is more useful for savegames than for actual filesaving.

  • Could you give more details to the "C/sec" process?

    • What do you want to calculate?
    • What is C?
    • What does C depend on? Does it increase when you buy more B?
  • There are two main ways:

    A) If the movement coordinates (Start and End) are always the same:

    Set X to: Self.X + 50 + 100*[(Self.X-Start.X) / (Target.X-Start.X)][/code:34ho81xw]
    (replace 100 by the number that should be added extra when the Sprite almost reached the target)
    
    [i][(Self.X-Start.X) / (Target.X-Start.X)][/i] calculates the movement progress of the Sprite (0 at the beginning, 1 at the end) and multiplies it with [i]100[/i].
    That way, the extra value gets higher, the more the Sprite has moved.
    
    Again, this only works [i]if the Start and End values are known and set each time[/i].
    
    B) Use a plugin, for example [url=https://www.scirra.com/forum/behavior-litetween_t70700]LiteTween[/url].
  • Hey rexrainbow

    Got a problem with the "Pick neighbor" condition.

    I have a click event on a chess, that should mark all neighbors by creating a Sprite on them.

    Tried pretty much everything I can think of, but the Sprite creation doesn't even trigger which means that the "Pick neighbor" condition results in no picked items.

    Here is my project .capx, I hope it is visible what I'm trying to do and where the problem is.

    If there are issues with it, just PM me.

    Thanks.

    Download .capx

  • This depends on whether you need to treat the projectiles differently.

    I guess that each projectile will have different effects on impact.

    If that is the case (instead of just graphical differences), I would highly recommend that you use several Sprites since that will make it easier for you to treat them differently in events.

  • As far as I know, that isn't possible, since expressions aren't strings.

    If you would load the expressions from a variable, C2 would load them as strings and not as expressions.

    If you only want to simplify your "fc_callDialog" function, you could do the following:

    • Add a function, you could call it "getDialog"
    • Add an action "Function.Set return value"
    • Insert your expression in the field
    • Now, in your fc_callDialog function, set the text to "Function.Call("getDialog")"

    This won't make the whole process less complicated, but it will keep the mess in the fc_callDialog function to a minimum.

  • This depends highly on the way you want to layout your game, e.g. if you want infinite scrolling or just inside your layout.

    If you simply want to follow the player on the layout, you can give him a "Scroll To" behavior.

    If you want to scroll infinitely, I will tell you the details, if you really wanna go with this.

  • This looks about right, I will need your .capx or a screenshot of those three actions to be able to fix your issue.

  • I don't know how you saved your Array, but you need to save it with the .AsJSON expression and load it with the "Load" action of the Array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, other than asking the user to switch it off in the settings, there's no way around it since the Control Center is part of the operating system.

    Likewise, you can't disable Ctrl+Alt+Del in any Windows Application.

  • Maybe not much needed, but still very appreciated!

    This plugin is one of my most used plugins for C2, so I'd love to get every update to it that you make.

  • Aye everyone,

    I am currently creating a program that will be exported with NW.js.

    Thus, it will be an executable (nw.exe) that I'll pack into a setup program.

    The program will receive regular updates.

    To deliver those updates to people successfully, I want a layout in my program that does the downloading of the update file (in .exe format). The user only needs to execute the file.

    The only possible solution I could think of, is to use AJAX to download it and NW.js to write the file with the content "AJAX.LastData" to the AppFolder.

    ___________________________________________

    I think, I understand how to use AJAX and NW.js, but I can't seem to get it to work properly.

    My problem is the following:

    The download starts, the event "On progress" triggers as well, but when "On completed" triggers and I write the file with the content "AJAX.LastData" to the UserFolder, the .exe file is always double the size it should be and gives me the error "The version of this file is not compatible with the currently executed version of Windows [...]" .

    (The original file, before uploading and downloading though, works fine)

    Also, when downloading the file normally through a browser, the downloaded file works perfectly.

    I also already tried to override the MIME type in AJAX to "application/octet-stream" which resulted in the exact same file.

    Is there any way to fix this?

    Or is it a thing that downloading large/.exe files with AJAX doesn't work in general?

    If so, is there an alternative apart from giving the user a simple download link to insert in the browser?

    Any help is much appreciated.

    Thanks for reading.

  • Use rexrainbow 's Tween2Effect plugin.

  • [quote:1rts64vz]Sorry, try again: Download

    Oh yesss, thanks so much!

    Now the first page only needs updating...

    Thanks for sharing!

  • [quote:2281oyed]To use password: "2,Password"

    Oh yissss, this is what I needed

    is this how I'm supposed to use it?

    Because the password format doesn't work for me like that...

    The .zip behind the download-link is empty btw.