Poxnixles's Recent Forum Activity

  • just wanna say that you're not limited in using C2's multiplayer engine, you can use 3rd party plugin to do that. I'm using Photon for multiplayer and I can make a multiplayer game with it.

    What are some good 3rd party plugins for multiplayer? Especially for a platformer where scrolling onto each player, for each player is necessary.

  • You'll want basically just:

    Sonic: On collision with Bumper:

    -Set Vector X to 420 * cos(angle(Bumper.X, Bumper.Y, Sonic.X, Sonic.Y))

    -Set Vector Y to 420 * sin(angle(Bumper.X, Bumper.Y, Sonic.X, Sonic.Y))

    The info.sonicretro.org/Sonic_Physics_Guide Sonic Physics Guide, particularly the Springs and Things page, gives some more numbers and info, but you'll want to update most values from pixels per frame to pixels per second.

    ^ That said, though, I tried it out myself, and I've recreated TheAmazingApple's bug in the process. Unless you're holding down the jump button, it caps your speed to Min Jump Strength. So the above example events currently won't work unless the jump button is being held down.

    If you wanted a really hacky workaround, you could simulate jump button under certain conditions to stop the behaviour from limiting the jump, but I realize that's pretty terrible.

    This has been a big help for quite a few things on what I'm working with, thanks!

    Anybody in this thread experienced with making online games in Construct? My project's aiming to have online co-op with a lot derived from this Sonic Physics behavior. Seems like one of the tougher things could be camera focusing on individual players.

  • Let's say your object that your spawning is named, "Enemy". And your trying to spawn him every 5 seconds. I know that's not what your doing, but you didn't provide enough details.

    So try putting this Event,

    Every 5 seconds > System create object, Enemy.

    Put what layer you want the Enemy on.

    For the coordinates of spawning use, X:random(width of your layout)

    Y:random(height of your layout)

    So Every 5 Seconds a "Enemy" spawns at a random spot anywhere on the layout.

    -But your question is what if he spawns in a block or somewhere he can't move?

    To solve that, use this.

    Enemy is overlapping Platform>Destroy Enemy

    >Create Object "Enemy" on layer 0 (random(width of your layout)) (random(height of your layout))

    Basically when he's created and he is somewhere he is not supposed to be, he will be destroyed and placed in a new spot, if this keeps happening he will keep spawning until there is somewhere "spawn able."

    This is a bad example but it can be worked with, if it is not fitting your game tweak it the way you want it or just not use it.

    I did kind of figure something out like this, but I want it so that enemies spawn relatively close to the player but not within their view.

  • No one?

  • Also, preferrably still in close proximity to the player.

  • For a platformer, what would be a good way to go about this? Of course, I don't want them to pop in within the player's vision or in places they can't even get to.

  • The same way. Family instance variables are additions to each object.

    Changed things up and everything's hunky-dory again, thanks!

  • It should be on the Family, not the enemy.

    In that case, how would I still get it so that each enemy has its own initial HP?

  • All the enemies in the game I'm making are intended to have an HP instance variable (with varying values for each), but it seems each enemy having the value and the family for enemies having the value is mutually exclusive. Any workarounds?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess by bounding box I meant collision box, I think. Not sure of the name. Actually I kind of figured out a weird way to go about what I wanted to do. Thanks for the help though, it pointed me in the right direction!

  • That basically works! Though I just thought of something: what if the second object's target was the part of the bounding box the first object was closest to, rather than targeting the second object's origin?

  • Not sure how much more I can explain besides the title. I'm sure it's simple to accomplish but I'm not sure what I'd use.

Poxnixles's avatar

Poxnixles

Member since 1 Dec, 2015

None one is following Poxnixles yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies