noisetank's Forum Posts

  • I use a separate object and pin it to the player, which works for my needs. The "firing" object, which is invisible can free rotate while the player moves independently on the other stick (which I just use 4 directions mapped to the 4 axis, like Gamepad 0 Left analog X axis < -25 | Simulate control left).

  • I haven't personally looked into the program with any great depth, but I did point it out to my artist and it sounds like he's planning on buying (or already bought) it. Importing his work into my Construct project has been seamless enough, though.

    As someone on the Construct programming side who won't be touching the Spriter files much at all (unless I need to resave them in the right format or rename something...small tweaks), is there any advantage to purchasing a copy for myself? The free version has been fine for those tweaks I've mentioned thus far, but I'm not sure if there's like, any limitations with the free version (similar to Construct 2 Free files having 100 event limits which would keep a Free user from opening a file with more than 100 events made in the paid version) or if there's a more advanced Construct 2 plugin available with the Pro version.

  • That works great! Thank you for the help (and the detailed examples so I actually understand what it's doing).

  • This one's been driving me mad, especially because it seems like it should be so simple...

    I'm trying to display and save a timer in seconds.milliseconds format (00.00) but I can't seem to figure out a way to keep it uniform. For example, if the time is 15.21, it's fine. If it's 15.20, it will display as 15.2, which creates an annoying flickering effect as the timer flies through.

    I did some searching on here and found this solution: "Time: " & int(timer)&"."&zeropad(round((timer-int(timer))*100),2)

    After spending some more time with it, however, I've noticed that it adds an extra zero in some situations (15.200) which is only slightly less annoying than my original setup. My hacky solution was to set the Text object's wrapping property to "Character" and resize the box so you'd never notice the fifth place, but then I realized that doesn't really work if the player goes up past a hundred seconds...

    Any thoughts? It seemed like the thread I got that zeropad solution from was the best answer I could find, but I wanted to ask the question on here before giving up completely and sticking with it.

  • Cool, I'll keep this bookmarked in case I decide to come back around to it. I'm just happy to have it functional for right now.

    Thanks for all the help!

  • I ended up making a group of events with all the controller triggers set to "gamepad contID" and the functions pass contID, where contID is a local variable in the group with the gamepad ID assigned to it. I still had to make three copies for the other three players, but I only had to change that one local variable for them all to work.

    Is there any advantage (performance or otherwise) to using your method over mine? I almost think mine might be better in the way that I could easily tweak it to allow each player to customize their controller mappings.

  • Would I still need multiple event groups for each player, then, to do four controllers? The way it works in my head is this:

    On gamepad (any number 0-3) A button pressed -> Call "jumpFunction" (gamepad.GamepadID)

    Instead of creating this event four times with gamepad numbers 0-3, I could do just the one and it would pass the gamepad number to the function and perform the action on whichever character has the matching gamepad ID. However, I don't know how to put "any" in the trigger event and it seems like I can't grab the current gamepad ID to pass to the function (gamepad.GamepadID needs a parameter).

    That's all totally theoretical and it's possible it just can't be done this way, but I thought I'd ask.

  • I'm trying to implement a multiplayer aspect to my game and I keep getting tripped up for a reason I hope can be remedied.

    As it stands, I have two event groups: the original player's gamepad events and a copy of the original player's gamepad events, which I tweaked to work with controller 2 and player 2 instead. This is fine and functional until I change player 1's events and forget to do the same with player 2.

    My question is: Is there a way I could wire this up so I only use one event group to control all players? I have the both players in a family, so replacing all the player 1 objects would be no problem, but I don't know how to make sure the controller event moves the right one (controller 0 only moves player 1, controller 1 only moves player 2).

    Thoughts?

  • Drakkith: Read your reply a little late, but it came in handy for my new project. Thank you so much!

  • I'm currently trying to work out the basics of a twin stick shooter (Geometry Wars, for example) in Construct, but it feels clunky and unwieldy.

    Ideally, the way this would work is that pushing a direction on the controller's analog stick would change the angle of movement (or shoot) in the exact direction that the player is pushing toward. I've managed to set up the left stick to correspond to an 8-direction movement behavior, which is bearable, but using the same methods for shooting on the right stick is not. I've managed to rig it up with a second object pinned to the player object (position only) and set the angle with the same code I used to create player movement, but it feels terribly inaccurate when I'm trying to shoot at anything with only 8 directional aim. It's also frustrating trying to figure out just how far I need to nudge the stick to get it to "lock" to the right direction.

    My question is: How can I smooth out these controls? Rather than have 8-direction movements mapped to the sticks, is it possible to convert the X,Y axis into reporting a 360 degree angle? I've been searching for Construct-specific help on the topic, but came up empty. I did, however find this Corona tutorial (http://coronalabs.com/blog/2013/09/24/t ... -and-axis/) that seems like it would have put me on the right track...but trying to replicate it in Construct ended up being an hour wasted.

    Can anyone point me in the right direction on this? It seems like there's a way I could use some clever math to convert the axis into a 360 degree angle that would solve all my problems, but I'm neither clever nor good enough at math to understand how.

  • Update: Okay, figured out the problem, but the solution still escapes me.

    I don't want canons to spawn too close to each other, so I create a "noSpawnZone" around them at the same time the initial touch creates a new canon. However, by adding the condition "Touch is NOT touching a noSpawnZone" to the "On any touch start event", it restricts any new canons from being made while an existing canon is being touched (because there's a "noSpawnZone" being touched SOMEWHERE).

    So, is there a way to "pick" the touch being referenced on the "Any touch start", so it would only check if the touch that triggered the event is touching a "noSpawnZone" rather than checking if ANY touch is?

  • Hello,

    I'm working on a touchscreen game for multiple players. The idea is that a player can tap the screen anywhere once to create a canon, then drag the canon around to control it. If another player wants to join, they can tap anywhere as well to create another canon (as long as they're not within a certain radius of any other canons to avoid accidental spawns by one person).

    I've got the basics of this implemented, however, I've noticed that I can't seem to be able to spawn any new canons while any existing canons are being touched. So, if one player is dragging a canon around, the other player's touch will do nothing until the first player lets go of their canon. Also, if two players touch the screen at nearly the same time, only one will spawn a canon. It's worth noting that, once spawned, all canons can be moved at the same time, so it's definitely picking up all the touches (just not when spawning objects is involved.)

    Can someone explain what I could possibly be doing wrong here? I've done all sorts of tinkering with the code and nothing seems to remedy this problem. My capx is attached.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did this help you noisetank? I'm going to be moving enemy collisions and projectiles into families, and this is going to be huge for me, but will take time. I'll need to make it so if a family projectile hits an enemy in the enemy family, react/animate appropriately

    It's worked to an extent...I can make my player character animate and move independent of the enemy, however I've noticed that the enemy seems to somehow grab the "orientation" variable I set up (sprite is mirrored or not mirrored depending on left or right orientation) and will turn in the same direction as my character does. Weird.

  • That would be a picking problem. :)

    What you'll need to do is pick the "Character_Sprite" that is related to the "Character". Few of the approaches you could take:

    - Saving UID of the "Character_Sprite" to instance variable of "Character" and using "Pick by UID" action.

    - Picking the "Character_Sprite" nearest to "Character". Might be risky approach, depending on how your game works.

    Just what I was looking for, thanks. :D

  • The issue is that it's not the character object itself that's animating, it's the character sprite object that goes along with it. As suggested in all the tutorials I've read, the character object that does all the platforming movements is invisible with a set hitbox. The animations for this character object are in a separate object.

    So my objects are as follows:

    player

    player_sprite

    enemy

    enemy_sprite

    My families:

    Characters

    • player
    • enemy

    Characters_Sprites

    • player_sprite
    • enemy_sprite

    And my events would set up something like this (this doesn't work and I understand why, I just don't know how to fix it):

    Every tick > Set position of player_sprite to player

    Every tick > Set position of enemy_sprite to enemy

    If "Characters" is Jumping > Set "Characters_Sprite" animation to "Jump"