25games's Recent Forum Activity

  • Ok, finally we found the solution:

    • Make a Cordova-Build of your project
    • Edit the config.xml and add the following: <plugin name="cordova-plugin-fullscreen" />
    • In the game create an event Browser -> Execute javascript "AndroidFullScreen.immersiveMode(function () { }, function () { });"
    • Call this event whenever you wanna hide the soft keys again
    • Before creating the build you may need to run the following command in your export folder: npm install cordova-plugin-fullscreen
  • Push - sry, but we need to solve this. Otherwise we can't release any game on Android...

    Hasn't anybody ever released a game on Android devices? It seems like this "bug" (I'm not sure

    if it is actually a bug) already exists for many years!

    Let's solve this

    We tried a lot to solve the problem and are still trying

    Thank you very much!

  • Hello!

    I have a really big problem:

    The game is in fullscreen mode and everything is just fine.

    But on some Android devices the navigation bar shows up when using the keyboard: https://25games.net/questions/keyboard.JPEG

    After the input, the navigation bar doesn't hide anymore:

    https://25games.net/questions/nav_bar_after_input.JPEG

    Even after changing layouts...

    Main Menu: https://25games.net/questions/nav_bar_main_menu.JPEG

    Highscore: https://25games.net/questions/nav_bar_highscore.JPEG

    I searched for this problem and it seems that some have this problem too, but there's no solution yet.

    Why is that? Building Android apps with user input is pretty useless without fixing this "bug".

    Thank you very much for your time,

    Severin

  • Hello everyone!

    I have another problem: I wanna...

    • ... create an object
    • ... set the object's instance variables before OnCreate is called
    • ... check within OnCreate the value of the instance variable

    My problem with that is, that OnCreate is called immediately after I create the object. But I want to change the instance variables of the created object first before OnCreate is executed

    Here's an example:

    I have an enemy spawner. The spawner has 2 different modes

    • Spawn the enemies behind a door and set the "invading" boolean to true. In OnCreate of the enemy check if "invading" is true and let the enemy run into the room
    • Distribute the enemies in the room (they're standing still when created). "Invading" is left false

    How can I access the instance variable before the "OnCreate"-event is called?

  • Oh, that's it! I was just confused by the diffrent terms "Layout" and "Layer"

    Thank you very much

  • Hello

    In Construct 2 it is necessary to have at least one instance of an object type in any layer in order to create another instance by an event.

    Since nearly each object in my project is created by script, I use a specific layer called "Unused" which is invisible and contains exactly one instance of each object which should be spawned by script.

    Now the problem is that my invisible enemies within the "Unused" layer are attacking the player.

    Does anybody know a best practice to handle that problem? Should I delete all objects within the "Unused" layer on start? Is there a more elegant solution for this like "deactivate" layer or something?

    Thank you guys!

  • Awesome, that actually solved my problem Thank you!

    (I really searched for that - not good enough... sry)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello again!

    I have another problem...

    I want my enemies to avoid themselves. Since my enemies make use of the pathfinding behavior I thought it would be a good idea to use custom obstacles and a regularly regeneration of the region around them.

    (With the physics behavior I get some strange results btw)

    When I add the enemies to the obstacles, all of them are added and they can't move at all anymore 'cause they are unable to get out of themselves (kinda funny right?)

    The solution would be to only add the other enemies with respect to every single enemy.

    So how can I add all other enemies but itself to the list of obstacles?

    Thank you in advance!

  • Thank you very much - now I understand how the objects are picked! Thank you very much!

    Have a nice day

  • Hello

    I have the following code:

    Currently the behaviour of this code is as follows:

    • All instances start their path finding process
    • When one enemy stops, all other enemies also stop even though their distance to the player is bigger than the minDistance

    How can I change it so that only the enemy who is within the radius stops and the others keep moving?

    Here's another exmaple

    This is what's happening:

    • When one character moves, the "movement" instance variables of all characters are set to "run"
    • When one character stops, the "movement" instance variables of all characters are set to "idle"

    What m I doing wrong?

  • Hello

    I have a problem with sessions in PHP together with Construct 2.

    I use the following PHP script (credits https://stackoverflow.com/a/9943142/6423282):

    <?php
    	header('Access-Control-Allow-Origin: *');
        session_start();
    
        if(isset($_SESSION)){
            echo "Session variable exists<br/>";
    
            if(!isset($_SESSION['test'])){
                $_SESSION['test'] = "Success!";
                echo "Variable has been set, refresh the page and see if stored it properly.";
            }else{
                echo $_SESSION['test'];
            }
        }else{
            echo "No session variable has been created.";
        }
    ?>
    [/code:x3hft4n9]
    
    When I run this script in my browser it works perfectly:
    [ul]
    [li] First: "Variable has been set"[/li]
    [li] Refresh: "Success!"[/li][/ul]
    
    But when I create a button in Construct 2 which sends an AJAX request to that session_test.php script the following happens:
    [ul]
    [li] First: "Variable has been set"[/li]
    [li] Refresh: "Variable has been set"[/li][/ul]
    
    It seems like there's always recreated a new session. I also tried to export my game and to upload it onto my webserver - same result. Does it have something to do with Construct 2?
  • You can keep your score hashed at all times. Check if the hash is correct before adding points or submitting the score.

    Oh yes! Good point, I'll try that.

    Thanks

25games's avatar

25games

Member since 18 Oct, 2017

None one is following 25games yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies