Ciao121's Recent Forum Activity

  • Hi,

    I would like to perform some action on export; I make an example:

    I'm developing a client/server game. Server is standalone node.js.

    When I update the client I'd like to update the $serverVers variable in the node.js server script (or in an external .js or .txt file), so I don't have to update it manually every time. Or maybe just a way to execute a batch file that I can use to perform what i need.

    I can't figure out a way to do it (maybe there is but I cannot find it). I think it could be useful,

  • Sorry to bother you with the same topic I wrote in the past.

    Finally I understood how appcache update system works and now everything changes

    1) If I full understood the releases notes the two triggers "Is downloading update" and "On update ready" were removed int r235. An if I'm right, this means I cannot force a message to make the user reload the game to use the latest version.

    2) in r240 three new triggers are introduced: "On offline ready", "On update found", "On update ready". But I cannot found those anywhere. (Yes, I'm using r240 )

    3) Service workers are seems to work only in Chrome and Firefox; so how can I force a message to make the user reload the game to use the latest version (see point 1)?

    The reason I need to have the player always use the last game version is because it is an online multiplayer game. If I add features to the server those will be available only tho players using the latest version. And if an user is not using the latest version he's disadvantage.

    One workaround I'm thinking about is to send the used client version number from the client to the server, and if the version is not the latest the server can send an update message (and the client will not allow the user to play until the client is reloaded).

    But this also has to problems:

    a) how can I show the update progress in every browser?

    b) I'm required to update the server software each time the client is updated (also if the server is not involved in those changes).

  • Yes, that was the object I was talking about.

    My doubt was because the way dropdown works in HTML.

    Anyway I solved reading the value on "selection changed" because I have all values in the AJAX.LastData.

    I'll keep in mind your suggestion if I'll need to change AJAX.LastData content.

    Thank you!

  • I read with ajax a .txt file containing (i.e):

    Server A|192.168.0.1|Server B|192.168.0.1

    with tokenat i populate the dropdown menu.

    So I have a dropdown like

    |--- Server A

    |--- Server B

    I would like to have

    |--- Server A (VALUE 192.168.0.1)

    |--- Server B (VALUE 192.168.0.1)

    The user select the Server and connect to the associated ip address in value

    Anyway I'have found a workoaround. The Ajax is still populated so I use:

    tokenat(AJAX.LastData,(ServerList.SelectedIndex*2)-1,"|")
    [/code:6cn4klkf]to get the ip  associated to the selected server
  • In html I can make a dropdown like this:

    <form action="myaction">
      <select name="cars">
        <option value="volvo">Volvo XC90</option>
        <option value="saab">Saab 95</option>
      </select>
      <input type="submit" value="Submit">
    </form>[/code:3b3j56rn]
    
    In construct 2 it seems to me that I only have a text for the option.... something like:
    [code:3b3j56rn]
    <option>Volvo XC90</option>
    [/code:3b3j56rn]
    and I can't find a way to show text and send a different value.
    Is this missing?
    Tank you!
  • Ops.... "Is downloading update" and "On update ready" are no more available.

    https://www.scirra.com/construct2/releases/r235

    So I read the new way to update game. Anyway.. suggestions for my question are welcome <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    in a game I'm trying to develop the first screen has a nickname field, a server selection dropdown and a start game button.

    The start game button is only enabled when the nickname is inserted and a server has been selected.

    I'd like to enable it only when the game is the last version so I'm sure all players are using the same game version.

    Reading the manual I see two states: "Is downloading update" and "On update ready". Maybe I could use "if NOT is downloading update" to enable the button. But I'm not sure it will always fire. Will the browser start uploading the update before the first layout is showed (so I can rely on this)?

    Any other way/suggestion?

    Thank you!

  • Probably this is the problem... from the manual: "Therefore, nothing can be displayed on top of a form control, apart from other form controls."

    So maybe I have to use a sprite. Anyway if anyone have a different solution... is welcome

  • Hi,

    I have a problem with the progress bar object.

    I make a progress bar on level 0, than I add a new layer on top (let's call it layer 1).

    I add a black rectangle on layer 1; the rectangle partially is over the progress bar. But the full progress bar appears on top of the rectangle.

    I need to have only the progress bar part that is not covered by the rectangle to be visible. How can I solve it?

    I made a capx: https://www.dropbox.com/s/hmqxmkpm09n7b ... .capx?dl=0

    Thank you!

  • I'm using the scirra own websocket plugin now.

    Thanks!

  • Cover a layer with sprite blocks, set the visibility of any that come within 300 pixels or so of the player to invisible. Leave them that way.

    How to set the visbility area/range?

    Thank you!

  • I'm trying the server side approach (just the first part in wich the server send each turret a targetID).

    It's workin in a 2 player game (player/enemy). I use:

    [ul]	[li]pick turred by turretID[/li]
    	[li]pick enemyTurret by enemyturretID[/li]
    	[li]turret add target enemyturretID.[/code:3dganqr1][/li]
    [/ul]
    The problem when it comes a third player. He saw all other's turrets as enemy turret. I can't use:
    [code:3dganqr1]
    [ul]
    	[li]pick enemyTurret by enemyturretID   <------[/li]
    	[li]pick enemyTurret by enemyturretID   <------[/li]
    	[li]enemyTurret add target enemyturretID.[/code:3dganqr1][/li]
    [/ul]
    I think because the the econd enemyTurret pick "overWrites" the first one. I think I should find a way to do something like
    
    [code:3dganqr1]
    [ul]
    	[li]pick enemyTurret by enemyturretID   AS A[/li]
    	[li]pick enemyTurret by enemyturretID   AS B[/li]
    	[li]A add target B.[/code:3dganqr1][/li]
    [/ul]
    Making all server side as you suggest in the second part of your answer could be a solution. But in this way I will not use the turret behavior at all.
    Maybe it's also better... I'm thinking about it.
Ciao121's avatar

Ciao121

Member since 18 Aug, 2016

None one is following Ciao121 yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies