oosyrag's Forum Posts

  • The simplest way would be to make the unique player the host. If you join a game, you will be part of the team, if you host the game, you will be solo.

  • Use the system layer expressions. For example you can subtract viewportleft from player.x to get the player's position relative to the viewport.

    https://www.scirra.com/manual/126/system-expressions

  • The first two problems are related - to set the origin frame, you would use the action Block - Set originalframe to Block.AnimationFrame.

    The swiping was more complicated than I expected without Families (I'm assuming you're using the free version of C2), so I've put together an example with comments here (with help from R0J0hound) -

    https://www.dropbox.com/s/ui33osmgp9tlq ... .capx?dl=0

    The next thing to figure out would probably be how to handle looping - I've included a bit for when newcolor is higher than the amount of animation frames you have, then it will loop back by using % (modulo). I didn't add that for when you tap the colors though - so if your color tries to change to a color higher than the number of animation frames you have, it will just get stuck.

  • Thanks R0J0, saving relevant information to local variables and repicking worked well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Repeat 35 times | Spawn Bullet
                    | Set Bullet angle to loopindex*10[/code:3fyzdq7b]
  • With multiple instances of an object, how would I set up conditions to pick two that for example are overlapping (or the same angle), if I didn't have access to families?

    ObjectA is overlapping ObjectA seems to always run, I guess as each instance is always overlapping itself.

  • Capx would help troubleshoot. Image path correct? In quotes? Same domain?

  • Actually I can begin to envision a MMO along the lines of Realm of the Mad God being done in Construct now with the multiplayer plugin. All the functionality should be there. It would still be a massive undertaking though.

  • The browser object has a close action.

    https://www.scirra.com/manual/110/browser

  • You need to make a counter. The simplest way to do this would be with an instance variable on your object. It starts at 0. Add a condition so that your "jump" control only works when CounterVariable<4. Whenever you jump, add one to CounterVariable. After you reach 4, you will no longer be able to jump. Then add an event to reset CounterVariable to 0, such as when you land.

  • The logic would be to actually have the world/background doing the moving. Create the next section of the background off screen and have it move in view. When the last section of the world leaves the visible screen, destroy it.

    Check out the Vertical Space Shooter Template that comes with Construct, it might give you some ideas. Instead of enemies/bullets spawning and being destroyed, it would be your world/background sprites.

  • I got another one week time to complete my project. I implemented swipe function but now i m struck.

    http://bit.ly/1R2TLDx

    the above link is the capx file.i have spawned four tiles using a single sprite and in each tile i displayed animation frame (0,3,6,9).

    i have totally 11 frames in tht sprite. when i tap the first tile it should change to next frame,on next tap on t1(tile 1) it should change to next frame but it shouldn't exceed frame 3...after frame it should start from frame 1...like that for tile 2 frames (should b 3,4,5) ;tile 3=(f 6,7,8);t4=(f 9,10,11)......how to do this ?

    i made a pseudo code but it not working..

    PSEUDO CODE

    on tap gesture on block |

    while(x<4) | block.color=block.color+1 //color is instance variable

    if(x>3) | block.color=block.color-3

    | x=0

    someone tell me how to make this pseudo code work

    and i have another doubt i will post it once i got this cleared ,at the same time i ll try to implement tht myself.

    Ok you have a few issues here. First you don't need a "While" condition- that will make the event run over and over again until the other conditions are false.

    Second you don't want the x>3 as a sub event of x<4 - the sub event will only run if the parent event does - basically if x is 4, the parent event won't run, and the sub event won't either.

    From there you also have a couple more problems. One is that your x global variable will cycle 0-1-2-3-4-1-2-3-4-1... ect, but this global variable will be shared for all your blocks and not each one individually.

    The other problem is that Block.color as an instance variable, and doesn't actually change the color of the block or do anything at all by itself. You want Block - Set animation frame to Block.AnimationFrame+1.

    Put those two together and you might realize your animation frame will keep going up no matter what your x variable is, so you'll need to rethink through your logic a bit. You probably don't need the x variable at all. I suggest having an instance variable for your block with the starting frame number.

    Block.AnimationFrame < Block.OriginalFrame+4 | Block - Set animation frame to Block.AnimationFrame+1
    Block.AnimationFrame = Block.OriginalFrame+4 | Block - Set animation frame to Block.OriginalFrame[/code:11biidh9]
  • That sort of game actually shares a lot more in common with the top down mechanics than platformer mechanics. You'll be using 8 direction movement, with some limitations on where on the screen you can go. I believe the top down shooter tutorial also has examples for endless enemy spawning.

  • Not a question, but I came across this and liked it, so I thought I'd share.

    Different types of lerp motions and a visualization of the math needed to create them -

    http://i.giphy.com/3ornjK3itVx9NZ3WUM.gif