dos88's Forum Posts

  • This might be a simple answer but this solution I'm suggesting is first thing that came to mind.

    In your event where the bullets follow the mouse X/Y, why not set an offset for the mouse.x/mouse.y? I mean like:

    Mouse.X -5

    Mouse.Y -5

    Tweak it until maybe if you can see if it'll work, but also try substituting +5 instead.

    If my memory is correct, -y corresponds to down, +y corresponds to up, +x corresponds to the right, and -x corresponds to the left.

    Thanks for the fast response!

    I have already attempted to play around with changing the mouse.x-5 mouse.y-5 thingys but it really does not effect the issue i'm having.

    Here is the actual capx file https://dl.dropboxusercontent.com/u/690 ... OOTER.capx

    If you open & run it, it will make more sense than me trying to explain it in text lol. right arrow key = show right arm + right gun & left arrow key = show right arm + right gun, left click shoots the bullet. Now each arm and gun follow the mouse on the x,y but you will notice when you rotate your mouse when using the left arm that it's almost like the controls get inverted.

  • This is hard to explain in just text so I will have to post some images on my little issue.

    The short explanation is I am trying to have it so that a gun follows the mouse on two different sides and is able to fire bullets, the gun follows the bullet just fine, the bullet however does not, that and once you switch sides the mouse controls seem to be inverted ?

    Anyways here are some screens of the code.

    The arms & guns are all separate sprites with the proper image points.

    I want to convert to this touch later on but I need to understand how the follow the mouse deal works

    Any help would be greatly appreciated!

    And than I use this to prevent the objects from going to a 360 angle.

    The code above works great actually, except for the fact that the bullets do not really follow the mouse.x & y, the seem to be at least an inch over where the cursor actually is on the screen.

  • Haha, well I made it to level 19 but died 88 times Fun game

  • How are you suppose to use this when you cannot import s3m files into C2..

  • Accidentally stumbled upon this yesterday and i'm in love with it..

    It's titled as a Procedural Tile Generator but can be used for pretty much any kind of pixel art plus it has onion layers ^^ and it's free <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    https://pnjeffries.itch.io/spartan-procjam-edition

  • - Did you try this:

    (Pick by Comparison: Sprite1.Animation Name = "Animation1") & Is overlapping Object(Sprite2)

    Yeah, that was one of the first things I tried which just refused to work for me, than I ended up using the object is overlapping and that seemed to work.

    Regardless I think I have it fixed

  • The sprite is the object overlapping. Just add the extra condition "Sprite.Is playing" with the animation name.

    Thanks for the response

    Yeah I knew about the object is playing condition, only I have that one object doing multiple things, but yeah I had to find a work around using instance variables, but thanks!

  • This is pretty awesome, thanks !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't seem to figure out how to do a condition for if animation is overlapping object than do this..

    I.E. I am trying to have an explosion animation trigger damage on another object but cannot use the "is overlapping object" since the explosion is a separate animation.

    Is there no way to do something like "object's animation is overlapping > object" ??

  • Phew, thank you, but that raise more questions. Now, when I know what to look for, I see NW.js is also used as one and only way to make Windows executable. I though, C2 is producing actual standalone binaries for the Windows, plus maybe with some dll dependencies, DirectX etc. Though this suggests, the game will always run through intermediate code using NW.js as the wrapper, which is basically the Chrome. However, as the NW.js seem to be the only way to make Windows executable and I've seen some pretty complex games made with C2 that had no issues with the performance, I guess it's alright not to worry about the performace beforehand.

    As far as I know NW.js is currently the only make to produce a Win binary executable with C2, I have yet to have a performance issue with C2 using the nwjs wrapper but I also focus heavily on performance and the weight of my gfx, sfx etc.

    I.E. as soon as I build a mechanic for a game I immediately do a play-test and then look to see if there is anyway I can possibly optimize or shorten anything in said mechanic. But that is just my habit.

    Also there are plenty of resources on keeping your game optimized in C2.

    https://www.scirra.com/manual/134/performance-tips

    https://www.scirra.com/blog/83/optimisa ... -your-time

    http://www.burquitlambadgers.com/2015/0 ... ance-tips/

  • You can preview your game through NW.js instead of the browser

    https://www.scirra.com/nwjs

  • You could give the object you want to spawn in the bullet behavior then you could do this:

    every 1 seconds

    --- create sprite at (random(640),random(480))

    --- sprite: set angle to random(360)

    --- sprite: move forward -640 pixels

    sprite: bullet distance traveled > 640

    --- sprite: set speed to 0

    There's also the third party move to behavior that may be useful here.

    Actually that is somewhat close to what I am currently trying

    My real issue is having the object created off-screen first, than launching the object at an angle on the veiwport than having that object stop randomly on the veiwport.

    I have managed to get this kinda working, I used create object at (spawner-sprite) off screen than using bullets angle of motion at random(0, 90), this will effectively launch the object from the spawner-sprite onto the viewport on a horizontal angle, I wish I could do random(0, 90, 140) and encompass a larger area for the objects bullet to launch, the real problem is that some of the objects get launched on the border of the window and are half in/half out of the screen, of course this is because I am using a random angle as well as a random speed for the bullet launch, and I am not sure how to prevent it.

    Edit : I managed to get the angles correctly working, now my only issue is destroying the object after it leaves the play screen without interfering with the object being created at the spawner-sprite.

  • Put the set speed action above the set angle action.

    That fixed it.

    Thanks for the help guys

    oosyrag

    LittleStain

  • Ahh, now I understand.

    I'm afraid I can't really help you with that, that it really look good. There are people here I believe are fare more competent for this kind of problem.

    But I've tried something.

    It works, but it doesn't really looks like something 'flies in'.

    Haha, well I tried your code and that just ends up making the objects act like leaves blowing into the viewport

    I'm looking to get 1 object thrown into the viewport from a random direction every (random) seconds.

    I appreciate you trying though!

  • > You could always add a small javascript <script> in your main HTML index file to disable right-clicking.

    > of course this doesn't really secure anything.. but it can hide the right-click context menu.

    >

    > More info. http://stackoverflow.com/questions/7370 ... y-web-page

    >

    > I did try this on one of my own test projects and it does effectively hide the right-click context menu.

    >

    This could work, but then you'll have to repack your game manually with NW.js, since first you'll need a HTML5 export to modify the code.

    Really its a lot of work when you could just build your game around "scale inner" or "scale outer" and that would prevent the black bars in the first place and remove the option to right click for a context menu.