Allardje's Forum Posts

  • Thanks for your reply!

    Actually i use the same object for different images.

    I think i can make myself more clear now.

    I got a object with all different frames ( not animations my bad there! )

    I made this image to make it a little more clear.

    As shown in the picture i got only one object with all levels as frames.

    I place the object multiple times in my layout.

    Now, on start of layout it has to use its instance variable "levelid" to know what frame it would show.

    But also as you can see, with the "Set Frame" action i can't use "levelid" as refference.

    Any idea how to do this idea?

    Thanks again!

  • Thanks for your awnser.

    I will try this soon once i get to that point again!

  • Hi.

    Finally i got the right idea about something !

    Well my problem is that i cant use animationID for some reason.

    I got the instance variable on the object as Type: Number

    With the "Set animation" action i can not use animationID as refference.

    Any idea why? Or what i am doing wrong?

    Thanks again!

  • Hi!

    For my problem i will use this example.

    I have a level select page ( for Android ).

    Now, i am looking for the best way to do this.

    Every level got it's own object / image ( level 1, level 2, level 3 etc. )

    Now what i can do is creating 10 images for all 10 levels and put 10 objects on my layout.

    Yet i think this is a waste of memory and objects.

    Is it possible to use 1 object with all 10 images as animations?

    What i had in mind that didn't work.

    One object.

    The object has animation frames: 0,1,2,3,4,5,6,7,8,9,10

    The object has a instance variable named: animationID

    I give every placed objects its animationID as: 0,1,2,3 etc.

    Than on start of layout, set animation to: animationID

    This actually doesn't work since i can't do the last step.

    I know this is wrong but i need some idea to reach that goal.

    Thanks in advance!

  • Hi all!

    I have a little question.

    I have some categories in my game which all have their own progress.

    So categorie one has 10 levels to complete.

    Categorie two has 20 levels to complete etc.

    On my start screen where you choose the categorie i want to have progress bars.

    So if a player is on level 4 of categorie one the progress bar has to be filled 40%.

    If a player is on level 3 at categorie two the bar has to be filled 15%.

    Any tips on how to create this?

    The level progress is saved in webstorages as the number itself.. So

    categorie 1 level 1 : "cat1" = 1

    categorie 2 level 4 : "cat2" = 4

    Thanks in advance!

  • Hi Lennaert,

    Thanks for your reply. Yet i do not understand what you mean..

    Can you take the Fruit example for this one? Thanks !

  • Hi again!

    A little problem is bugging me!

    I have object with all unique instance variable. For this example i will take:

    Object 1. : Instance Variable: [number] = 1

    Object 2. : Instance Variable: [number] = 2

    Object 3. : Instance Variable: [number] = 3

    Now i want to:

    IF Instance Variable [number] = 1 SPAWN Object : Spawn1

    IF Instance Variable [number] = 2 SPAWN Object : Spawn2

    IF Instance Variable [number] = 3 SPAWN Object : Spawn3

    How i started:

    For each Object ( family for Object 1, Object 2 and Object 3 )

    ???????????????????????

    Object Spawn ??????????????

    I am thinking in a way of calling all instance variables the name of the object i want to spawn.

    But as far as i know there is no way to spawn a object with the name of a instance variable am i right?

    Though that is what i try to make.

    I will try with another example:

    Object: Apple , instance variable: fruitName = Apple

    Object: Pear , instance variable: fruitName = Pear

    Family: Fruit ( including Apple, Pear )

    EVENT:

    For each Fruit

    ACTION:

    Spawn {{OBJECT: Fruit.fruitName}}

    But that isn't possible..

    I hope i made myself clear once again.

    Thanks in advance!

  • Hi all!

    I am mostly creating applications for Android.

    This is fun but the hastle is about the screensize you got to use.

    So.. To fix this point i always try to find good ways to put my content in a good way.

    Now.. I have this idea where i got to much content for my screen. I want to be able to slide trough.

    The idea:

    Those "objects" go on for about 15 sprites

    What i want to do is being able to slide trough by swiping..

    So what i tried is pinning all objects to a background behind it.

    I gave the background a drag & drop behaviour on horizontal.

    This actually works pretty cool but now the problem is.. All objects have the touch action.

    So once i make them untouchable dragging from left to right works perfect.

    Once i make them touchable, the touch object will overrule the drag & drop which results in doing the action on touch.

    I hope i made myself understandable.

    Any help is kindly needed!

    Thanks in advance!

  • Hi!

    I am trying to figure this one out for a while now.

    I want to know if there is a way i can continue playing my background music even when the layouts change?

    Thanks in advance!

  • Totally agree on this one.

    If there was one method to share your score on facebook.. Well.. Free advertising!

    Indeed i do not agree to use clay.io.

    I respect the plugin, but indeed i do not force my users to login to simply post to facebook wall.

  • Try Construct 3

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

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

    I got a question.

    I found a bug in my game which pretty much * up the highscore system.

    Once fixed this will be great again but the problem is. Once there is 1 person with a old version he is able to ruin the highscore system every moment.

    Is there a way to force update the application before you can play?

    I am using CocoonJS to compile.

    Thanks in advance.

  • Anyone?

  • Update: i see everything manually works.. So my guess is that something is blocking my request.

    I did use the:

    header('Access-Control-Allow-Origin: *');

    But to bad without result.

    Here is my complete script:

    <?php
    header('Access-Control-Allow-Origin: *');
    
    $dbhost = '';
    $dbuser = '';
    $dbpass = '';
    $conn = mysql_connect($dbhost, $dbuser, $dbpass);
    if(! $conn )
    {
      die('Could not connect: ' . mysql_error());
    }
    
    $name = $_GET['name'];
    $highscore = $_GET['highscore'];
    
    $sql = "UPDATE hiscore SET name = '$name', score = '$highscore'";
    
    mysql_select_db('*****');
    $retval = mysql_query( $sql, $conn );
    if(! $retval )
    {
      die('Could not update data: ' . mysql_error());
    }
    echo "Updated data successfully\n";
    
    // close connection 
    mysql_close($conn);
    ?>
    

    Oh ps.. Ye i know somehow i made my database "hiscore" instead of Highscore.. So i'm aware of that it's not a typo ;-)

  • Hi all,

    Still bugging around with AJAX.

    All my requests etc are working but now i actually want to write my data to a DB.

    At this very moment i do not care yet about safety so..

    All i want to do is write a name and score to the DB. My PHP script works fine, my AJAX post works fine also.. But this is if i manually input the name and score.

    What i do have:

    <img src="http://www.pixentral.com/pics/1sS5LxdqBWrbk0vRk2qMP4lKorZ.jpg" border="0" />

    Can any one explain to me why this is not working?

    So again,

    If i change the link and input the name and score myself it does work. So somehow it will not get my username.Text and/or the global variable; Score

  • Omg i'm so stupid. Just lost it lol..

    On "TAG" completed is the way to go.. Just the normal function pfff...

    I should really quit for today Ghehe