Stomphoof's Recent Forum Activity

  • If you are on free edition, you probably would like to keep your events count as low as possible.

    I took theubie image and remade it a little to use function object and sprite animations.

    There is only one Mob sprite with four different animations "Mob1", "Mob2", "Mob3" and "Mob4".

    As in theubie image i've used Local text "SpawnType" to choose("Mob1","Mob2","Mob3","Mob4"), but then instead of spawning Mob sprite equal to SpawnType variable I've called Function "spawn" with "SpawnTpe" variable as a parameter.

    Function: On "spawn" spawns Mob sprite and then set proper animation by name selected from function parameter.

    <img src="http://dl.dropbox.com/u/34375299/Construct%202/examples/spawn.JPG" border="0" />

    It basically do the same thing like in theubie example but using less events

    shinkan I already offered that type of solution (1 sprite, 4 animations) in my first post. He wanted more info on how to do it this way. I'd go with the 1 sprite method myself.

    If you're going that route, you wouldn't even need the variable or function. Just set animation to choose("mob1",etc) when you create the mob. Even less to code that way.

    So how would I have 4 different mobs setup using this method? I mean yes, I can see how using this would give me a frame of the animation as the Sprite, but how would I give that frame the individual stats (HP and whatnot) as needed?

    I can see in theubie's first example how it would work, by setting the instance variable in the code...but not sure how that would work in the function example.

    I think I am being stupid here >.>

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Stomphoof You posted that you're on the free edition...this is where Families would be your friend.

    Without it, you have two directions that I would look into:

    1, you could create a local variable and set it with a choose action..I.e. choose('mob1','mob2','mob3','mob4'), then use 4 sub events to check to see if the local variable = mob1 or mob2, etc...then spawn your sprite.

    2, you could create 1 mob sprite and give it 4 different animations. Use the choose function to randomly set one of those animations, then check the sprite to see what animation is running and set any instance variables on the sprite to correct values (health/hp, movement speed, etc.)

    Again, this is a LOT easier in the licensed version using families.

    So I have heard. Sadly I don't have the cash for it at the moment. So I am working with what I have right now.

    I may just avoid the random mob spawning and just stick with 4 spawner types that spawn a specific sort of enemy.

    Option 1 sounds like the best idea but...not sure how I would set that up exactly to randomize which of the values in the varible it would choose.

    EDIT: I think I see what you are saying. Setup a global variable like "mobSpawn = random(4)" and then when the spawner gets within range of the player (no idea how to check this) have it check that value and spawn a dude.

    That about right?

  • So here is the link: scirra.com/arcade/action/2853/square-platforms

    I did this in about 7 hours after I went through both the basics tutorial and the first beginner platformer tutorial I found.

    Its just 2 levels plus a game over and title screen, and a single looping music track. However, the levels loop and keep score and how many stages you finish. How high of a score can you get?

  • Now, I have been told this is possible, and a gent on Reddit by the name of Firebelly gave me some tips on how to do the random interval portion, by using an Instance Variable. To quote him:

    Create an instance variable on the spawner, "NextSpawnTime" and on each spawn, set that that time to Time+Random(N,N). Then set your spawn time to Time = Spawner.NextSpawnTime.

    I think I know what that means. Doing it will be interesting though.

    However, he says I should be able to have the spawner create 1 of 4 creatures at its spawning intervals (which is what I want to do). I got no direction for this part though, and since this is only the second game I have created, I come here for some assistance.

    I did not see anything similar to my issue in the FAQ either.

    I am also trying to figure out how to have an enemy maintain a distance from the player but chase him, shooting at him, but that is later.

  • Not sure what to say, really. I am an older gent, just made my first game after doing 2 tutorials on Construct 2.

    Right now I am using the free edition but I can see myself eventually getting the full version, possibly next month!

    Glad to be here, and happy that I made a game on my own! :D

Stomphoof's avatar

Stomphoof

Member since 31 Jan, 2013

None one is following Stomphoof yet!

Connect with Stomphoof

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies