calebbennetts's Recent Forum Activity

  • There's a behavior called "Persist." Just give it to everything you need the game not to reset. When you actually want to reset the game, like when the player dies, add the action "System -> Reset Persisted Objects" in your events.

  • Oh, okay. Thanks!

    (There's that solved)

  • It seems like most people on these forums have robots for their avatars, all in the same art style. I'm just curious, where do those come from?

  • You mentioned a problem with adding 500 to the character's vector x. I bet that is because of the platform behavior's "max speed." If you had events raise the max speed during the move and then put it back down when the move is finished, I think that would fix it.

  • I was just thinking of this. I'm gonna try moving every object some jump to the left when the player gets past a certain x-value and then destroy the terrain when it's outside the layout. I'll tell you if it works out.

    Update:

    Eeh... Not the easiest thing in the world. I think some infinite runner games move the platforms, not the player character. Imma maybe try that.

  • I'm sorry to hear about your mom. While I was writing this, the song "Only love can hurt like this" was playing in the background, and I think that means something.

    For your game, this seems doable.

    To spawn enemies, first make a spawner object. This can just be a rectangle with initial visibility false. Give it an instance variable, like "to spawn," and set it to the most enemies you want on screen

    For the conditions, use System: Every X seconds AND Spawner object: compare value: "to spawn" > 0

    For the actions, use spawner object: spawn another object: enemy AND spawner object: subtract from: 1 from "to spawn"

    To add back in to the counter, use

    enemy: on destroyed

    spawner: add to : 1 to "to spawn"

    Note: this assumes you're using only 1 spawner.

    For enemy movement, I just use

    enemy: compare x: > player.x

    enemy:simulate control: right

    else

    enemy: simulate control: left

    To jump, you could try

    enemy: is moving, invert condition (right click the condition and select "invert")

    enemy: simulate control: jump

    As far as making the boss, you would probably need a global variable like "points."

    Add the action "system: add to: 1 to points" to the enemy destroyed event

    Add the condition "system: compare value: points < (the number of enemies you want killed before the boss spawns)" to the spawning event.

    Add the new event:

    System: compare value: points >= (number to spawn boss)

    Spawner: spawn another object: boss

    And give the boss the AI you want, maybe the same as the base enemies.

  • Thanks! This should be just what I need. The reason I need the array is that I design several small sections of map and store them in array, then the game randomly chains them together by duplicating each section from the array's instructions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm making a platformer game with a procedurally-generated world. The game makes chunks of map by spawning and giving properties to several sprites at a time based on an array. In other words, each x-value is a different sprite with all its properties, and all the x-values for one z-value are a chunk of map. Initializing the array is what gives me trouble. I know I can use JSON strings to load an array, but how do I make such a string? Is there a way to embed this string in my final game? Otherwise, I'm stuck writing to hundreds of array elements separately in one simply gigantic event. I'd appreciate any help you can give.

  • "Set layout scale" is also useful for #1.

  • Are you saying you want every copy of, say, a hero sprite to have its own attached copy of a sword sprite? If so, I think you want a container. Go into the hero's properties, find container, click "add object," and click the sword object. Then, every hero you make will automatically spawn a sword. Then the events would just be:

    on hero created->set sword position to hero(image point 1), pin sword to hero.

    Or did you mean something else?

  • Yeah, you use the event sheet. Be sure to specify "position only" as the pin type. Then give your arm object the "rotate" behavior and give events to rotate some positive speed when right is down and angle is greater than zero, else rotate negative when left is down and angle is less than 270, else rotate with speed zero.

    And at all costs, avoid the walruses...

  • If you want a top-down view, you might want to look into 9-patch instead of tiled background. It lets you have an outer border with a tiled center.

calebbennetts's avatar

calebbennetts

Member since 6 Sep, 2014

Twitter
calebbennetts has 13 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x4
    Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x3
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

18/44
How to earn trophies