How do I do these few things?

0 favourites
  • 12 posts
  • blob:http://imgur.com/fea492fd-c4b1-4740-aa53-296e6973ea78[/img]

    Im working on a multiplayer HTML zombie survival game, but I got many questions, this is the first game iv ever done.

    • How do I stop the gun sounds when the player dies? When I click you can still hear the gun sound even tho the player got deleted...
    • How do I make zombies not go trough each other?
    • How do I make zombies spawn outside the player's view range? They keep spawning on top of the player lol
    • How do I make the map infinite (The player can go into any direction without there beeing a wall)?

    Thanks.

  • 1. Add a subevent event to the mouse click, add system compare 2 values, player.count > 0 (will not work as intended for actual multiplayer obviously)

    2. Make the zombies solids and use the custom movement behavior with Push out solid

    3. Use invisible spawning objects/sprite and spawn on those objects

    4. You cant, I believe the max is 100kx100k atm (most likely more then enough) Or , you have to make an infinite scroller type of thing where layout stuff is generated around you as you "appear" to move closer to them

  • - How do I stop the gun sounds when the player dies? When I click you can still hear the gun sound even tho the player got deleted...

    There are many ways. A simple way would be a variable called death or someting like that. And the code would be:

    On left button clicked and death is equal to 0 --> spawn bullet on layer 0 (and so on)

    Zombie | on collsion with Player --> Player| destroy and set death to 1

    System| On start of layout --> set death to 0

    - How do I make zombies not go trough each other?

    You can maybe make them solid. (Behavior. Dont know if that makes bugs. Try it. I dont have the time to test it. XD)

    I would answer you last two questions too but i dont have the time. Sorry.

    I hope i helped you

    Cryttexx

    Edit: i just saw somebody else answered already.

  • 1. Add a subevent event to the mouse click, add system compare 2 values, player.count > 0 (will not work as intended for actual multiplayer obviously)

    2. Make the zombies solids and use the custom movement behavior with Push out solid

    3. Use invisible spawning objects/sprite and spawn on those objects

    4. You cant, I believe the max is 100kx100k atm (most likely more then enough) Or , you have to make an infinite scroller type of thing where layout stuff is generated around you as you "appear" to move closer to them

    1. It worked well, thanks

    2. Wait, how do I do that? I know how to make them solid, but how do I give them push behavior? Its not in the list

    3. Then they will spawn on objects and if the player is unlucky enough to step on top of one of them it might cause errors

    4. How do I make the layout generation thing?

    Im sorry I am so bad at this

  • >

    > - How do I stop the gun sounds when the player dies? When I click you can still hear the gun sound even tho the player got deleted...

    >

    There are many ways. A simple way would be a variable called death or someting like that. And the code would be:

    On left button clicked and death is equal to 0 --> spawn bullet on layer 0 (and so on)

    Zombie | on collsion with Player --> Player| destroy and set death to 1

    System| On start of layout --> set death to 0

    >

    > - How do I make zombies not go trough each other?

    >

    You can maybe make them solid. (Behavior. Dont know if that makes bugs. Try it. I dont have the time to test it. XD)

    I would answer you last two questions too but i dont have the time. Sorry.

    I hope i helped you

    Cryttexx

    Edit: i just saw somebody else answered already.

    I tried making the zombies solid, the still go trough.

  • Add the behaviour Custom movement to the zombies, and use the function action pushout solid when overlapping

    You can also spawn zombies outside of the Viewport or at a certain distance from the player (player.X +1000 for example)

    Automatically generating levels for infinite layout style can be found in the infinite runner example

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add the behaviour Custom movement to the zombies, and use the function action pushout solid when overlapping

    You can also spawn zombies outside of the Viewport or at a certain distance from the player (player.X +1000 for example)

    Automatically generating levels for infinite layout style can be found in the infinite runner example

    The zombie spawning outside of the player's viewpoint worked, thanks a lot!

    Im still confused about the zombies, do I do it like this?

    And I can't get the push out solid action...

  • Am at work arm so can't check for you.

    There is also a plugin on the forum somewhere called "pushout solid" which makes the application a lot simpler.

  • Am at work arm so can't check for you.

    There is also a plugin on the forum somewhere called "pushout solid" which makes the application a lot simpler.

    Oh no problem, take your time !

    I ended up working one out but...

    It caused... problems...

    lol

  • Rex Pushout solid

    Unziip and place the folder in construct2/exporters/html5/behaviors/

    restart c2 and add the behavior to the zombies.

  • dropbox.com/s/mha0jwlho4endr9/rex_pushoutsolid.zip Rex Pushout solid

    Unziip and place the folder in construct2/exporters/html5/behaviors/

    restart c2 and add the behavior to the zombies.

    Alright, ill tell you how it goes once I try it.

    Also how do I expand the map size?

  • click somewhere in the layoutview on a blanc space and in the left window will show an option to increase layout size

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)