sinoscuras's Forum Posts

  • 15 posts
  • Hi, I'm following the article below to understand how P2P works in Construct 2.

    https://www.scirra.com/tutorials/1432/getting-started-with-peer-to-peer-turn-based-multiplayer-games

    I've uploaded capx project as an exported HTML5 website in my shared hosting server. For some reason, whenever someone out of my network connects to the game it only shows "Your turn/Enemy Turn" message but no one is able to make the move & end the turn. What is the issue here? Hosted game is given below,

    http://devs-lair.com/p2pgame/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all, I'm new in Construct 2 & I'm trying to make an enemy sprite move when it gets hit by player. So far the enemy is moving to direction accordingly but it looks as if the enemy just snapped to that position on hit. What I want is the enemy should move with a sliding effect, like when it gets hit it should look like it got pushed back instead of just snapped. Here is my capx,

    drive.google.com/file/d/10HoyXafApOMP_yQJQBNhv3hVGxmUPBHX/view

    Need this fix badly! Your help will be really appreciated. Thanks!

  • Sorry, I can't understand your point. Can you explain through the event sheet I gave?

  • Thanks for your suggestion. I tried your way, but now the enemy is not moving after getting hit by player. Anything wrong below?

  • To move an object linearly over time, you can utilize the bullet behavior. Your enemy will also have the bullet behavior. The start speed will be 0.

    When the enemy sprite gets hit by the player, set the enemy bullet speed and angle to the desired values.

    You can also utilize the timer behavior to determine when to end the movement. On hit, trigger the timer for the desired duration, and on timer complete set the enemy bullet speed back to 0.

    Thanks for your response. I already did something similar like this. Please check my capx file. What I simply want is the sprite should move with a slide effect, not just snap to the position.

  • Hi all, I'm new in Construct 2 & I'm trying to make an enemy sprite move when it gets hit by player. So far the enemy is moving to direction accordingly but it looks as if the enemy just snapped to that position on hit. What I want is the enemy should move with a sliding effect, like when it gets hit it should look like it got pushed back instead of just snapped. Here is my capx,

    drive.google.com/file/d/10HoyXafApOMP_yQJQBNhv3hVGxmUPBHX/view

    A solution is really appreciated! Thanks in advance!

  • Thanks so much! This worked. Kudos!!!

  • Hi all, I'm trying to make an enemy moving towards my player. It's closing in to my positions but during the movement it rotates. I don't want it to rotate during movement. I'm using "set angle towards position" & bullet speed. I also tried using "set bullet angle of motion" & turned off "Set Angle" for bullet behavior, but the enemy just triggers the "right_walk" animation no matter where it's located. Here is my capx,

    https://drive.google.com/file/d/1ttBEu9TH1YIHum8zd5Lk-JG8WECdDFTe/view?usp=sharing

    How can I fix this issue? Thanks in advance!

  • Thanks a lot! Finally working now!

  • Thanks again, this is really working for left & right. But when it comes to up & down, player is stuck again. It seems I've to set the X,Y coords of the offset differently for Up-down. I tried by changing values many times but now I'm at a loss, what to do?

  • Thanks again. I did as you mentioned but still not working. Am I doing something wrong here?

  • If you put something like "Enemy destroy" in event #18, you'll see that the collision between the enemy and player is triggered.

    To stop movement you can use "overlapping at offset" condition.

    For example, if your virtual joystick is between 316 and 45 degrees, check if player is overlapping enemy at offset X=+10. And if it is, set isCollide variable to 1.

    Thanks for your reply. I did as you suggested for offset, and it works. But now another problem just came up, my character is stuck with the enemy since isCollide is fixed to 1. How do I revert back to 0 so that I can move again?

  • fixed.

  • Hi everyone, I'm trying to make a game with C2 where I want to stop movement for both when player & any enemy collides with each other. My main player & the enemies have solid behavior, but for some reason they're not triggering at collision. I'm using touch event to move my players and custom movements to move enemies. Here is my capx,

    drive.google.com/file/d/1rlTkXvJz05tof658mXbaxsMveyxfGux9/view

    Please can somebody tell me what's wrong here? Need this help badly, thanks!

  • Hi everyone, I'm trying to make a game with C2 where I want to stop movement for both when player & any enemy collides with each other. My main player & the enemies have solid behavior, but for some reason they're not triggering at collision. Here is my capx,

    drive.google.com/file/d/1rlTkXvJz05tof658mXbaxsMveyxfGux9/view

    Please can somebody tell me what's wrong here? Need this help badly, thanks!

  • 15 posts