justifun's Recent Forum Activity

  • Each tile has to be placed in a equal sized square. When C2 imports the strip, it simply divides by the number of columns/rows you specify equally.

  • Here's a starting template i've been working on for spawning players that will help a bit

    dl.dropboxusercontent.com/u/403350/SpawnPlayerExample3.capx

    But you are on the right track for wanting to get things setup cleanly right from the beginning so you dont have to re code things over and over.

    making use of functions will help repeat tasks with only having to code them once.

    What i've done in this example. is Created a function that spawns a player. I then assign a unique ID or name to the newly created player eg: "player 1", and you can also set specific starting values for their health etc.

    for example

    on object touched "start" - Function Call "Spawn Player"

    you can also add arguments if you want to spawn a player with different variables etc, like more health.

    eg: on object touched "start" - function call "Spawn Player" (100)

    In the function itself you would setup what each of those unique arguments would be eg: argument1 = max health, argument 2 = max damage, argument 3= lives etc.

    Then anytime you need a new character to spawn you would use.

    on object touched "start" - function call "Spawn Player" (100)(40)(3)

    The function itself would look like this...

    Function on "Spawn Player"

    -> create object "PlayerObject"

    -> PlayerObject -Set Health to Function.Param(0)

    -> PlayerObject Set Damage to Function.Param(1)

    etc.

    The same idea can be applied to dealing damage however it occurs.

    Create a function called "DealDamage"

    -> Subtract Function.Param(0) from Player.health

    Now where you would have the event that occurs when a player collides with the lava or an enemy for example.

    You can also add an argument that would specify what type of damage they received, if you want to have multiple different amounts based on who hit who, or what hit what.

    eg:

    in the function called "DealDamage"

    If Function.Param(0) = "lava"

    -> Subtract 10 from Player.health

    If Function. Param (0) = "enemy"

    -> Subtract 20 from Player.health

    So when you call the function On Function Call "Deal Damage" (lava)

    it would know to deal the amount of damage according to how much damage lava does. This is also helpful that all of your variables are in one place to find later when you want to tweak them.

    You can use an argument as well to specify a specific amount of damage taken.

    eg:

    Subtract Function.Param(0) from Player.health

    Player On collision with "enemy" Call Function "Deal Damage" (20)

    See if you can apply these ideas to what you want to do, and fire back any questions you may have and i'll do my best to answer them.

    cheers!

  • I much prefer animating with spine, its way more intuitive for me. Spriter is a pain in the butt for me to use.

  • One way to approach it is to separate out each animation to play only when a specific set of events is true.

    eg: play the crouch walk animation if the down and left keyboard buttons are pressed.

    which would look like

    keyboard On Left Arrow is Down-> play crouch walk animation

    keyboard On Down Arrow is Down

    repeat this for each and every type of unique movement you want the player to do.

    To transition between them nicely, you will also want to make use of the "on animation crouch walk" is finished events.

    So after you are done crouch walking you might trigger the play "stand up" animation so it looks nicer and doesn't just POP into place.

    so that would look like

    PlayerSprite On Animation "crouch walk" finished -> PlayerSprite set animation to "standup" (play from beginning).

    If you find that animations are interrupting each other....

    For example. if you player is playing a falling animation and you press left or right and that makes him start walking again in the air. you can make use of the "is playing animation" event. and then invert it and make it a "is NOT playing" event condition

    eg:

    keyboard on key down "Left"

    (a second condition) PlayerSprite is NOT playing animation "falling" -> play "walk left" animation

    this way the "walk left" animation will only play provided the "falling" animation isnt currently playing.

  • flyovergames is working on a spine plugin! It can be found here: http://www.github.com/flyover/spine-c2-plugin

    Current Features:

    Importing a character rigged and animated in Spine

    FFD Mesh support

    Animation clip switching

    Skin Switching

    Speed Playback Control

    *NEW* Stepping Control

    *NEW* Event Timeline Support

    *NEW* Still image representation in editor view

    How to use----------------------------------------------------------------------------------------------------------------

    1) Add the spine plugin to your Plugins directory and restart Construct, then add it to your layout.

    2) Export your animation from spine using the Export -> Json feature in spine, and make sure to check the box "Create Atlas"

    3) In construct, right click the "Files" folder in the projects window and click import files

    4) Import the 3 files that you just exported from Spine (ex: raptor.atlas, raptor.json, raptor.png)

    5) Select the spine plugin object from the objects window, or click it on your layout and in the properties window set the following:

    Spine Data URL: raptor.json

    Atlas Data URL: raptor.atlas

    Skin Key: (The name of the skin you want to start with) eg: default

    Anim Key: (The name of the default animation you want to play): eg: walk

    6) Press play in construct and see your animation in action.

    Try pinning the spine plugin object to a invisible sprite that has all of your player movement behaviors on it to make it move around.

    Tip: If you want an animation to play from frame zero when you switch to it through actions, make sure after the "Set Anim" action, to add a "Set Time (0)" action as well.

    Please consider using the donate link on the plugin page if you've found this plugin useful!

  • storage.cocoonjsservice.ludei.com/CocoonJSLauncher.apk

    I couldnt get it to load though on the ouya

    it starts then crashes.

  • ludei

    Ashley

    Steps to reproduce:

    1. Use any project

    2. or start a new project (normal template or concoonjs which ever)

    3.

    Observed result:

    CocoonJS app give error

    Alert!

    Javascript error!

    Error: createShader OpenGL error '1281'

    preview_cocoonjs_postlude.js, line (col undefined)

    This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer.

    -This happens even with a brand new project and nothing added.

    Chrome works fine, but cocoonJS app running the lan preview breaks

    Construct 2 version:137

  • devsbuild.it/resources/type/article/coppa-what-consider-developer

    Is your game being developed for kids? Check out the new regulations for apps starting july 1st.

  • eager to see what you come up with. just got my ouya today.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another alternative if you don't have a mac, is to rent one online in the cloud such as macincloud.com

    its a $1 an hour, or they have other pricing options

    Since you are just using xcode to compile, you dont need it for long.

  • add this as a second event to your "on pickup coin" code

    set textbox.text = player.currentmoney

justifun's avatar

justifun

Early Adopter

Member since 9 Oct, 2012

Twitter
justifun has 3 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies