digitalsoapbox's Recent Forum Activity

  • The OR block seems fine to me.

    Instead of Every X Seconds try giving the Player a new variable (Player.CanFire boolean start true) and check/set that when they fire.

    for each Player

    check gamepad OR block

          if Player.CanFire == true then

            Set Player.CanFire = false -- so they can't fire again yet

            Do your normal firing stuff

            Wait Player.projectileFireRate seconds -- adds delay between firing

            Set Player.CanFire = true -- lets player fire again

    That does it, but if there's any kind of drop in framerate the weapon doesn't fire. Why Every X works different than Wait X is a bit confusing. Still though, a step in the right direction.

    Thanks!

  • Why would the or block have to be checked every tick, when it can only affect anything every player.fireratio seconds?

    Or are you planning to add more code to the block?

    Yep, the second one. Also, since the player can begin firing at any time, having the gamepad input checked in the OR block under the timer could mean a delay in the projectile firing.

    I tried mapping this player input control to a button, and it works fine with the timer (without setting the projectile direction, obviously) - but not the analog stick. I'm almost wondering if it's a bug in the gamepad controller behavior now.

  • Also putting the every x seconds condition above the or-block could make a difference, but I'm not completely sure about that.

    The OR block is for player input that should be checked continuously, so I don't think it'd make sense to reverse that. Tried that originally, but I'll try the local timers suggestion - thought about it, wanted to avoid it, but it's better than it not working. The issue seems to be linked to the every x seconds, since it works fine without any delay in place.

    Thanks!

  • Bumping this in case anyone else has any ideas on what the issue may be.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Still the same issue, plus I've just ended up with duplicated code. I think I just need to find another way to do the delay, hopefully without recreating the events for every potential gamepad.

    Oddly, doing player movement in the exact same way works perfectly, as does creating projectiles without any delay between them - it's just anything with a timer on it that breaks.

    Tip: Make a function for all the stuff that the current block you have is executing. Then you can just call the function instead of having all that code repeated for each player.

    The way it's working now doesn't have it duplicated for each player, and I'm pretty sure calling a function every tick for each player to check for continuous input wouldn't be any more efficient than the way it's set up in the OP.

  • Thanks That's exactly what I was trying to avoid having to do, but if that's what it takes, so be it. Also, it does work properly when there isn't a delay between spawning the projectiles, so...that's weird.

    I was hoping the For Each block would handle each player separately, as that's how I thought it was supposed to function...maybe that's not the case?

  • If you want to disable all collisions for a specific object type, you should be able to set collision to disabled without specifying which objects to stop colliding with. This doesn't work w/ asm.js-based collisions yet, but hopefully will soon.

  • Yes: scirra.com/manual/28/layer

    Also, check out the "is on layer" event.

  • I have a local multiplayer game I've been working on, but have hit a wall on a bug for players firing projectiles using gamepad analog sticks.

    Basically, I have a variable on each player that contains a playerID that corresponds to a gamepad. If the right analog stick is about a value, the player should fire at a set firing rate.

    The problem I've run into is that it only seems to work for the lowest-numbered player/gamepad. That is, if player 1 is firing, players 2-4 can't fire. If player 2 is firing, players 3 & 4 can't fire.

    Here's the event sheet below:

    <img src="https://dl.dropboxusercontent.com/u/14245368/firedelay_01.jpg" border="0" />

    Note that the playerShooting events are for testing purposes to see if an individual player is firing. It shows that they are, yet the issue with firing remains so long as there is a delay. If I remove the delay, however, all players can fire individually, so it's something to do with the "every x seconds" event, though I can't think of a better way to do the delay.

    Any hints or suggestions would be greatly appreciated. Thanks!

  • rexrainbow

    I couldn't find any mention of it, but are external tilesets currently supported? As in, can I export my tilesets so that all tilemaps can reference them (since they may change in the future and it's easier to manage updates that way outside of C2 and in Tiled)? I've tried importing the .tsx files into my C2 project, but just end up with a blank screen.

  • > TwinTails, PlasmaGames2013, digitalsoapbox, lennaert: You can try it out, and give feedback to us. I want to encourage to tell me if you found any correction in the descriptions.

    > Bear in mind that the official Photon SDK demo-particle just sends two updates per second. I don?t know its limits.

    >

    2 updates per second :\ ?

    with nodejs I had to kick it in the b*lls cos it was giving me relay speeds of 10ms ^_^

    It's not fast enough for multiplayer, but 2 updates per second is more than enough for turn-based.

  • Will it works with Mobile Devices ? That means Android and IOS Apps.

    lmgtfy.com

    Words are fun! So is reading the posts that have the information you're asking about already linked to.

    Deko - VERY cool! Gonna be testing some realtime performance in a game tonight!

digitalsoapbox's avatar

digitalsoapbox

Member since 21 Aug, 2013

None one is following digitalsoapbox yet!

Connect with digitalsoapbox

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • 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
  • Email Verified

Progress

18/44
How to earn trophies