justifun's Forum Posts

  • Tweaked the file and emailed it back to you.

    I've added a "sightrange" variable to the TUSK object (this is the range that the enemy will be able to see before attacking.

    then within that range, he will play the attack animation

    you will need to try and figure out how to do damage now to the player. Give it a try and report back if you need any help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First create several different types of platforms you want the player to land on while running.

    next, using the system (every 1 second or something) to spawn new objects.

    Set their X position to just beyond the .x of the layout of the screen so that they will start off screen.

    Next use a system every tick event to move the platforms back in -X towards the player at whatever interval you want (probably a variable that will increase over time to speed up the buildings.

    Then lock the player's jump so that its only up and down and they can't move left and right.

    to separate the platforms so that they get created at a variable distance, set that original random timer you used to spawn the platforms to a setting like random(5) seconds. This way, some will be further apart and some will be closer together. Make sure the maximum distance apart isn't too big for the player to jump though. Also you will probably need to add another variable to that as the speed increases because the gap the player crosses will get bigger and bigger as the speed of the platforms come towards them.

  • right click your event and choose "system" -> "trigger once while true"

    also, right click your event and choose "add sub event"

  • Here's a follow up.

    1) Create a instance variable for the enemy called "sightrange" - give it a default value like 20 (in the properties field on the left)

    2) add new event

    type: system

    "every tick"

    for the action choose "enemy sprite" - set value

    Then in the next dialog box pick your variable "sight range"

    Now create a new event

    system - compare instance variable

    pick "sight range"

    and change the expression to "<" (less than)

    and where it says 0 right now, change it to distance(self.x, self.y, player.x, player.y)

    substitute "player" for whatever your called your player sprite.

    Then in the action for this new event put something like "set animation" to "attack"

    or whatever you want your enemy to do when the player is close

    now each time the player gets with whatever "sight range" default value you give it, it will execute those actions

  • Yeah, like whiteclaws said.

    Create an invisible sprite and pin it to your character, and put the scroll to behaviour on that instead.

  • To have the enemy attack from a distance you need use the distance() expresssion

    distance(x1, y1, x2, y2) Calculate distance between to points

    so in your case

    system - every tick - compare distance(player.x, player.y, enemy.x, enemy.y) < 20

    ----do actions

    2)

    For the enemy characters turn off the property "has control" if you are using the platform behavior on it.

  • Its super simple. Just use the "count" feature

    scirra.com/manual/133/common-expressions

    Compare the sprite count to 0 in your case and if so, goto next layout

    System "Every Tick> - Compare Sprite.count is equal to 0

    goto layout 2

  • im curious to this as well.

  • Create a button

    on keyboard pressed "a" -> textfield.text = textfield.text & "a"

  • Use a sub event to "pick nearest" when distance is below your threshold, then destroy that one it filters out.

  • You probably want to use it in system -> "every tick"

  • Here's the process for using cocoonjs and xcode incase you haven't seen it

    wiki.ludei.com/cocoonjs:xcodeproject

  • One option you might want to try is using a service such as

    macincloud.com

    You can "rent" a mac online for as little as $1 a day.

    You will still be required to have an ios developer license though to publish the app, (not 100% sure about debug versions though)

    Please post back if this ends up working well for you, i'm curious but haven't tried yet.

  • Yup you can use those conditions as well.