Volh's Recent Forum Activity

  • Have the index have a global variable

    When you click on play, have that assign a random value 1-30 to that global varible

    if that global varible equals 1 go to layout1

    if that global varible equals 2 go to layout2

    that would be logically clear, even if it requires 30 conditions...

    Ty, i understand :).

  • Try variable= this go to this

    variable = that go to that

    A lot of extra events, but at least its doable.

    Sorry i dont understand what are u saying :(

    Try with variable but how? :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi people :), i have a problem with my game...

    Well i'm making a game of calculations and well,

    My first layout is the index of the game, when i click on play: I make an event on system to "go to layout" sum.

    I want to make 20 layouts of sums for example. 20 of subtraction and 20 of multiplication and randomly in getting each of them.

    Each game has 1 layout of sum, 1 layout of subtraction and 1 layout of multiplication.

    For example:

    Index -> Go to sum 13 : correct answer -> Go to subtraction 26 : correct answer -> Go to multiplication 3 : correct answer -> Go to win layout and show score.

    My first though is use the system event "go layout by name" and named the layouts of sums with: sum1, sum2, ... sumN and use the event with a concat sum+random(1,30). But we don't have a concat operator... Someone knows an idea for do that?

    PD: Sorry about my english :/.

  • In the linked post is a screenshot of the javascript lines.. but sending score and.. is very easy with the built in ajaxplugin or if you want pass it per post with a custom ajaxpost plugin.. <img src="smileys/smiley2.gif" border="0" align="middle" />

    Ty, i can't make this with a label...?

    Because my porpuse is... Get the score at the final of the game... :/

    c2runtime.js i add this:

    function showScore()

    {

         var myScore = document.getElementById('testScore');

         alert("ola");

         $.post("score.php", {score: myScore}, function(data) {

         alert(data);});

    }

    testScore is the ID of my text box.

    now my php code:

    <?

    $score = $_POST['score'];

    echo $score;

    ?>

    html code:

    <html>

    <head>

    <title>Untitled Document</title>

    <script src="c2runtime.js"></script>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

    <script>window.jQuery || document.write("<script src='jquery-1.7.1.min.js'>\x3C/script>")</script>

    </head>

    <body>

    <button id="showID" onclick="showScore()">Show Score</button>

    </body>

    </html>

  • Men if i can make this... I will love u XDDD

    Then i need to get the name of my text box... Yes i use a text box to show my score in the game.

    How i can get the ID of the text box? :/ tyyyyyyy!

  • No one knows anything about this problem? :/.

    When i open the source code c2runtime.js

    [-1,z.l.prototype.d.S,g,[

    [11,"Score"], how i can get this value... Is a kind of gigantic array with more big array's inside...

  • Hi people, first of all i give thanks to the creator/s of this awesome program.

    Well i have a problem here... If someone can help me i will apreciate so much :P

    My problem:

    I create a game of math calculations, i have a web page and i want to get the "Score"(a global variable of my game) to my webpage, well when i see the code named c2runtime.js, i try get the value of the global variable...

    I can get the value with this code at the end of the script:

    function showScore()

    {

         $.post("score.php", {score: Score(*)}, function(data) {

         alert(data);});

    }

    (*) there i need to put the name of the global variable to pass the score to the php file.

    Someone knows if this is possible?

    Thanks. :)

Volh's avatar

Volh

Member since 12 Apr, 2012

None one is following Volh yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies