StomachBug's Recent Forum Activity

  • StomachBug

    Setting the "MoveTo" to "No" only skips the physical moving, the logical moving still works.

    After calling Action:Move to neighbor/Action:Move to chess/Action:Move to LXY, the logical position will move to target logical position, then designer can get the responded physical position by ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) ). i.e. the chess moves

    from ( sprite.X, sprite.Y ) to ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) )

    Thanks rexrainbow, I'll give it a try.

    Also should different sizes of objects on the board matter? I find that they continue to overlap when moving into one another instead of stopping movement. Is this right as when they are a uniform size they will stop moving.

    Thanks

  • StomachBug

    Set the "MoveTo" to "No" in property table to disable the built-in moving in rex_grid_move behavior. Designer could maintain physical moving manually, like adding tween moving.

    rexrainbow

    Ok, so I have set "MoveTo" to "No" and am moving the object by (example) "Self.X - 32" much like what the chess piece does in your first Board tutorial but I may actually need to go back to using the MoveTo function for the physical object as well due to overlapping issues. I have a couple of questions based on the game I'm working on:

    Using GridMove, this can help prevent objects overlapping one another in the same space. A problem I have found is that if I make the size of an object different to what the Board tile size is then objects tend not to collide and easily move across one another. Is there a fix for this or am I using the behaviour wrong?

    Also do you know of a way by using the thumbstick on a gamepad to have an object move step by step instead of smoothly? Basically having the object move to the desired position, waiting a moment and then moving once more even while the thumbstick is towards any given position at any time?

    If you have the time to take a look at my capx it would be greatly appreciated.

    https://drive.google.com/open?id=0B3txcMQrB2eWWDY1dl9ScTNpcTg

    Thank for all your help!

  • Try Construct 3

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

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

    Uses "Action:Add chess" (rex_board plugin) to add chess into a board, it only set the logical position without changing the physical position.

    If you want to put a set of chess, you might see rex_layout2board plugin.

    Hi rexrainbow ,

    Thanks that worked a treat! Another thing I wondered is if it is possible to make the GridMove behaviour have a more 'snapping' like action?

    At the moment I am using a gamepad to control movement of an object but what is happening is too smooth a movement. Is there a way to have the motion behave so that even if the thumbstick is pressed in any given direction, the object will movement step by step instead of smoothly? For example like how objects move if you drag them around in the layout editor with the snap to grid active?

    Many Thanks

  • Hi rexrainbow,

    I have been using a couple of your plugins (most notably the grid move and board ones) and they are fantastic! Thanks a bunch for coming up with all of them!

    I would like to know if there is a way to set an object to the board without having to create it first? Say for example if I have several instances of one object which I have already assigned to certain positions on the layout but I still want to use the grid move behaviour based on the board.

    Any help would be greatly appreciated!

    • StomachBug
  • Yep that sorted it quite perfectly. Didn't realise how directly I was comparing the values at the time. Thanks again for your help!

  • You are comparing apples and oranges. You check if TotalDistance is > HighScore, but then divide TotalDistance by 10, so the next time HighScore is always going to be 1/10 of TotalScore. Use a local variable to set CurrentScore = round(TotalDistance/10) then compare CurrentScore > HighScore, and save CurrentScore.

    Ah soooo, I feel like a fool. Thanks blackhornet, I'll give it a go right now.

  • I've been trying out this method for storing a High Score but whenever the game comes to an end it simply stores the score as far as the player has gone on that round. So what ends up happening is even though the current score is less than the High Score the game saves whatever the last score was.

    It's really odd because I have a check which says that only if the TotalDistance > HighScore then should it set the HighScore to the latest TotalDistance and not every time.

    Here's an example of what I'm using at the moment:

    If anyone can help me out with this I would be truly gratful!

    Thanks!

  • Once again, R0J0Hound dishing out the tasty treats. Thanks for the great behaviour!

  • Ah brilliant! I now realise why they say to do that in the platformer tutorial. Thanks for your suggestion DurandalCorp, I'll give it a shot!

  • Hey ya'll

    I've got some physics objects that float in space and when you grab them, it creates a slingshot that fires them off in the opposite direction using a physics force. So far so good, however when I want each object to have it's own animation, the objects framerate drops immensely when it gets fired off! Everything else on screen that doesn't have the physics behaviour, moves and acts normally, it is only when I have the animated object reacts to physics!

    Does anyone know how I could resolve this? Ideally without just having to have the objects not be animated.

    Thanks folks

StomachBug's avatar

StomachBug

Member since 24 May, 2015

None one is following StomachBug yet!

Connect with StomachBug

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies