Artpunk's Forum Posts

  • Hey OP did you notice the setting on Project Properties for 'Cordova iOS scheme' I think its called?

    I believe you want to make sure this set to Modern (app) for a new iOS game.

    Something to know about if you didnt already.

  • You do not have permission to view this post

  • Made this gif a while back when I was working on a grenade launcher.

    The game has actually progressed a fair bit since then. Finished all levels for Area 1 (Three areas to go) :|

  • Can you post a c3p file pls?

  • Hi Gigatron was wondering if you ported your CRTMonitorFX2 effect to C3 runtime?

  • I posted a simple loot bounce demo here. Not sure if that would work for you?

  • I use dictionaries, but you can use an array too.

    You can create a system that will need a couple of global variables and at least one dictionary.

    Lets say you have two weapons. Create a global variable called weaponState with default value 1 and another global variable called ammoEquipped. weaponState will only ever be 1 or 2, and ammoEquipped contains the ammo for the currently equipped weapon.

    In the dictionary set two keys called ammo1 and ammo2 each with value 100.

    By default player has weapon 1 selected, so weaponState = 1.

    When player fires a bullet subtract 1 from ammoEquipped.

    When player presses keyboard key 2, the value from ammoEquipped is set to dictionary key ammo1, weaponState is set to 2, the value from dictionary key 'ammo2' is loaded into ammoEquipped.

    When weapon is changed by pressing key 1 or 2 on keyboard, you can also switch animations in player sprite to visually show which weapon is equipped.

    EDIT

    Heres a simple example to point you in the right direction weaponSystemBasic_artpunk.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In that situation you can make your jump conditional on an instance variable.

    So give your player an instance variable named jumpCount. Then for the events controlling your jump, you can say something like.

    -On touch release

    -If player.jumpCount < 1 - make player jump and increment jumpCount by 1.

    If you try to jump while he is in the air, the jump events wont trigger because jumpCount is not < 1.

    Then when player lands, set jumpCount back to 0. Now player can jump again.

    Would that work?

  • Have you tried disabling pixel rounding?

  • Hey man thanks, I have no idea about a release time. I have to build all the levels and improve artwork. Still a lot to do. Id like to have it finished and published by the end of the year but not certain.

    EDIT

    Here's a basic example to point you in the right direction: basicElevator_artpunk.c3p

    In a nutshell the elevators use bullet and solid behaviours and a container to group a jumpthru object that gets pinned to the ceiling and another object pinned under the floor that kills player if he gets caught underneath.

    Containers are great because you only need to position the elevator object in the level and the other container objects are automatically created. You just need events to position and pin them.

    The movement is controlled by instance variables. On start of layout, instance.var 'positionY' is set to be self.Y. Instance.var 'distance' is manually set in the layout. So if you want the elevator to travel 4 tiles on y axis enter 64 (4x16px tiles).

  • Pretty happy with how these elevators for the Slum Tenement levels turned out.

    You can ride on the top of them but dont get caught underneath or you'll get squished.

  • Just an update to say I finally got a demo up on itch.io.

    Link is in the first post of this thread, but Ill put it here too:

    littleadventures.itch.io/cyberduck

    Hope it's fun.

  • Add the following to your HTML

    > <script>
    window.addEventListener("keydown", function(e) {
    // space and arrow keys
    if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
    e.preventDefault();
    }
    }, false);
    </script>
    

    I'm surprised NG doesn't do this by default, but at the end of the day a blanket wide change to standard usability would be terrible.

    Ashley maybe this could be an export setting for HTML5? Or part of the browser object?

    This worked for me too Elliott . Thanks, good info!

  • ok I can see that would definitely work. But it would actually involve more steps that simply putting choose(0,0,0,1,1,2).

    I guess Im hoping to figure out a mathematical solution where I could weight the values within a single expression... Im not sure if its possible.

    So in non-programmer terms Im trying to say something like:

    On Event > Set Variable: (50% of the time return = 0, 30% of time return = 1, 20% of the time return = 2)

    Without the need to have additional conditions.. if that makes sense.

    ----

    And beyond this, Id like to have a solution that could be adapted in other instances to allow for more possible values. Like... in some other cases I might want to return values of 0,1,2,3,4... each with different probabilities.

  • Just say I want to set a variable to a randomly chosen value of either 0, 1 or 2.

    I can use the action choose(0,1,2) In this case values 0,1,2 have equal probability of being returned.

    If the action is altered to be choose(0,0,1,2). Now the value 0 has twice as much chance as being returned as either 1 or 2.

    choose(0,0,0,1,1,2). In this case 0 has more chance of being returned than 1 or 2. And value 1 has more chance of being returned than 2, but less than 0.

    Is there a more elegant way to create this situation?