NicholasMDS's Forum Posts

  • 12 posts
  • Thank you guys for your posts

    .

    vee41 That's a good idea, but I coudn't find a way to "set sprite1 origin to...". But there must be a way of doing it!

    DuckfaceNinja Agreed. That would be a great addition to Construct 2. Maybe if we send this idea to them, they can hear us! Ashley is the girl, right?

    What I've done to solve my problem is: When I need to compare the two different ImagePoints, I call an animation identical to the other one, but with the Origin Point positioned where I need. It worked out greatly for my purposes.

  • Sorry, I don't know why posted the topic 2 times. I hope someone can delete this one.

  • I have two sprites, each one with some ImagePoints.

    I can get to connect the Origin Point of one to the Image Point of the other.

    But can I get to connect the ImagePoint 1 of one Sprite to the ImagePoint 2 of the other one?

    Thanks in advance!

  • I have two sprites, each one with some ImagePoints.

    I can get to connect the Origin Point of one to the Image Point of the other.

    But can I get to connect the ImagePoint 1 of one Sprite to the ImagePoint 2 of the other one?

    Thanks in advance!

  • Yes. I don't know if I need to install anything else besides the Visual Studio, but I've done everything the tutorial said. :\</p>

  • Yes. I don't know if I need to install anything else besides the Visual Studio, but I've done everything the tutorial said. :\</p>

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey people.

    I'm having some problem exporting to Windows Phone 8:

    I've made everything in the tutorial ( ), but I just can't export the game to the format that I need to upload it for Windows Phone 8 Store. I keep getting the following when click in Build Solution:

    Full Image: Can someone help me with it?

    Thanks in advance!

  • Hey troublesum

    nameIsOk and nameIsNotOk are columns on my "names" table.

    I was getting <\br> for an error in my Password, but now it's ok.

    I managed to get numbers from the Code to Construct 2, finally. But one thing isn't right:

    $sql="SELECT * FROM nameIsOk ORDER BY id";
    $result=mysql_query($sql);
    
    echo intval($result);
    
    //echo 'hi';[/code:kofd3k1x]
    
    With this code, I get 0 from the $result. If I put echo intval(1), I get the number 1, so it's happening a problem when storing the variable of nameIsOk column to the $result Variable (the idea is if nameIsOk column == 1, the name is ok, if nameIsOk column == 0, the name isn't ok).
    
    Don't know if you can help me store correctly the nameIsOk value to the $result variable, do you know about it? Thanks for all your help until now!
  • Hey troublesum, thank you very much for your support.

    But I have only one last question that probably will solve my problem...

    I managed to return the AJAX.LastData, but I'm returning "<\br>".

    I have a database with 3 Int Values in the table: the id(AutoIncrement), int nameIsOk and int nameIsNotOk, that I'm correctly filling with the values 1 (if Name is ok) and 2 (if Name isn't ok).

    I want to get the NameIsOk int value and print it in my GameScreen, but what I'm getting in the text box is a "<\br>". And if I try to print it from a Global Number Variable it gets "NaN" (wich I think means Not a Number).

    What I'm doing in the code is the following:

    // Retrieving data from database
    $sql="SELECT * FROM nameIsOk ORDER BY nameIsOk DESC LIMIT 05";
    $result=mysql_query($sql);[/code:8ava4v53]
    
    I know that probably is missing some coding and probably that the "$sql=" code is wrong, but I don't know the sintax of PHP, I only know some programming in Java and C++...
    
    If you can help me with this last thing, I'll be a lot grateful!
    
    Thank you again for your attention and support.
  • I've put Ajax.LastData on a Text Object when On Complete triggers, but nothing appears there.

    Do you have another way of comparing a data that the user entry with one in the SQL Database?

  • I'm having similar problem here (similar, not the same):

  • Hello people!

    I'm having problems with the AJAX On Complete and On Error triggers.

    I'm trying to compare a text that the user put in my game with one in my SQL Database, to see if it already exists and add this text to an Unique Variable.

    He enters it and then I Send to URL "http://xyz.blablabla/user/user.php?name="&userEntry.txt" (method "POST", tag "SaveName");

    With that done, it runs my php code:

    if(isset($_GET['name'])){
    
         $name = strip_tags(mysql_real_escape_string($_GET['name']));
         $sql = mysql_query("INSERT INTO `$db`.`names` (`id`,`name`) VALUES ('','$name');");
         
         if($sql){
         
              //The query returned true.
              echo 'This name has been added to the Database';
              
         }
         if(!$sql){
         //The query returned false.
              echo 'This name already exists in the Database. Put another';
         }
    }[/code:lgd9stpg]
    Until here, everything is ok. The code is running well and working.
    
    Getting back to Construct, I put the SaveName Trigger:
    On "SaveGame" Completed (The query returned true): Set True Variable to 1
    On "SaveGame" Error: (The query returned false): Set Set Error Variable to 2
    
    ___________________________
    Running this, and putting the text to compare to the SQL Database, everything goes fine. If the name is new it adds to the Database, and if not it don't add.
    
    BUT the game returns True 1 and Error 2 in any case I test. If the name exists or not, the game return 1 and 2. It can't happen because I wanna make that if returns True 1 it goes to the next layout and if returns False 2 it DON'T go and appears an text asking the player to put another name.
    
    Can someone help me out with this? The game is almost complete and I really want to release it (will be my first game released  ), but this problem is giving me headache. =(
    
    If you guys needs any Screenshot to help me out I post, but I don't think it's necessary.
    
    Thank you all in advance!
  • 12 posts