VeritasDesign's Recent Forum Activity

  • Colludium

    That totally worked. I would never have thought that putting those two together would have done that though. In my head you can't both be touching the button and not touching the button but I guess since technically it does run them in order and is checking for all those things to be true it ends up working out. Thanks for the help!

  • PhoenixNightly:

    The problem was not the highlighting of the button. I had already set that up the same way your example is showing. The problem was that I needed a way for the button to then do it's thing once you stopped touching it. There is only an option for a global on release, and not an option for an object on release. I've done a work around by using variables I was just hoping there was something built into the touch events that I was missing. Thanks for trying to help. Greatly appreciated!

  • Yeah, I gotcha. There are always learning curves jumping to new software and the way things worked in one don't always work in another. Not trying to be difficult here just trying to make sure I'm not missing something super easy since it's all new to me

    I'm using the variable route for now and it works fine I just wish there was an "on object release" choice for touch events. Seems like an oversight to me. Thanks for the help Newt!

  • Anyone else have any other suggestions for this?

    What I ended up doing for now is a variation of what was suggested and just did an invert of the touch event touching the collision. So if user is touching the player sprite but not touching the collision it can move.

    It works, but still not perfectly because you can end up dragging your finger off the sprite when it runs into collision and stops moving. I still can't believe there is no simple built in bounce collision stuff for touch controlled objects like there is for other control schemes.

  • PhoenixNightly:

    I would love to be able to do that...but there is no Touch Is Over event like there is for Mouse. You are either touching the object or not. Unless I'm missing something.

    newt: the thing with trying to do a timer is that if the person moves their finger away from the button without releasing it, it would still trigger the timer because it had been touched...and you don't want that. You want it to trigger only if you have touched and released that object.

  • I figured as much but I was hoping there was something built in. I'm a long time Game Salad user who is trying out Construct for the first time and Game Salad had an "on release" function so it was super easy to set up something like this. Going the variable route means I have to set up variables for every single button that I'm putting into the game. It's not difficult, but it is time consuming and seems like something that should be easily handled through an event.

    Is there really no way to do this through the touch events?

  • Here is what is going on:

    I have a button. When the player touches the button, it changes the image to a highlighted state to show that it has been touched. What I would like to have happen is then when the user releases the button an action happens (like it goes to the page associated to the button).

    Because of the limited touch commands I cannot figure out how to get this to work with the highlight option. There is no option for choosing "on release" of a specific object...which i don't understand why there isn't when there is a choice for when you touch a specific object.

    I can't use "on any touch end" because I have multiple buttons on the page. It has to be the release of that specific button. It's easy enough to set up the button when pressed to go to a page, but the on release just has me baffled with this system.

    I'm sure I can set up some variable type system to see if the button has been pressed and released and so forth but I was hoping there was a simple logic thing I was missing with the touch events, like if I just invert so and so command it will work like I want it.

    Any help for this would be greatly appreciated. This seems like something that would be really easy to do.

  • BluePhaze:

    I guess I should have made this more clear. I'm controlling a sprite using the Touch control. To move the sprite I'm saying:

    If TOUCH is touching "Player" then set position of "Player" to Touch X and Touch Y.

    This is how I've done it in the past on other engines and assumed it was the proper way to do that here. I'm not using the Drag and Drop behaviors (though I suppose I could try using those).

    Anyway, using your suggestion I have to add the inverted collision conditions into that rule so it knows that the object can be moved as long as its not colliding. Therefore the rule now says

    If TOUCH is touching "Player"

    and if

    "Player" is NOT overlapping "Wall"

    then

    set position of "Player" to Touch X and Touch Y.

    but going this route won't work because like I said, as soon as the object overlaps, the rule goes into effect and stays in effect because nothing is stopping the Player from overlapping the collision creating an endless loop.

    There isn't another place to put the NOT command because it has to be with the initial touch control. Does this make more sense? Maybe I'm just not understanding you correctly...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • BluePhaze:

    Thanks for responding back so quickly. That's a good suggestion but it doesn't work quite right. The touch object will overlap the collision and the rule basically says "Hey don't let touch work if overlapping." which on the surface sounds great. The problem is, the object is always overlapping at that point and so the rule is always in effect and you can never move your object again. I could add in a bit of manual bounce back to shove it away from the wall object so it's not overlapping but then I'm right back to it looking janky again.

    And unfortunately the "on collision" event doesn't want to seem to give me an Invert option so it's overlap or nothing.

    Any other suggestions?

  • I have set up a game where you drag a character around the screen with your finger using touch controls. I need walls to stop the movement of the character (like if he was going through a maze) but for the life of me I cannot figure out a way to do this. I'm new to using this program and so much of the collision detection in this engine seems to be set up with using Solids and then a movement behavior. But I can't seem to find any behavior combination that would allow a touch controlled object to collide with a solid like all the other control schemes do.

    I've been using Game Salad for the past few years and they have simple collision detection. If an object collides with another object you can just set it to bounce and if neither object have any bounciness, it will just stop moving. But since I can't seem to find any bounce like events in this engine when using touch, I'm totally stumped.

    All I want is a way to stop the sprite's movement like it does using any of the other control types. I've tried using a set position command to make the object manually bounce back a bit if it collides, but it looks really janky and doesn't always work right especially if I try to use a small movement number. I'm sure someone must have built a game using this type of control scheme before but I just can't seem to find any examples of it in the manual or in the tutorials.

    Any help that can be provided would be greatly appreciated.

  • This is the first post I've been able to find with someone talking about touch control and collision so I'm hoping someone can help with my similar problem. I have set up a game where you drag a character around the screen with your finger. I need walls to stop the movement of the character (like if he was going through a maze) but for the life of me I cannot figure out a way to do this. I'm new to using this program and so much of the collision detection in this engine seems to be set up with using Solids and then a movement behavior but controlling things with touch seems to completely ignore solids.

    All I want is a way to stop the sprite's movement like it does using any of the other control types. I've tried using set position command to make the object bounce back a bit but if it collides, but it looks really janky and doesn't always work right. Any help that can be provided would be greatly appreciated.

VeritasDesign's avatar

VeritasDesign

Member since 19 Jan, 2014

None one is following VeritasDesign yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies