labithiotis's Recent Forum Activity

  • Hi All,

    Is their a semi easy way and preferable using easeTween to move a sprite to a target but on a curve/spiral path. Like bejweeled butterflies do when moving to score

    Subscribe to Construct videos now

    I was thinking I could offset the Y and X by every tick while easetween progress is less than 1. Tried this:

    Sprite EaseTween progress is between 0.1 & 0.5 | Sprite.X or Target X = Sprite.X + (1*(Sprite.EaseTween.Progress*10))
    Sprite EaseTween  progress is between 0.5 & 0.9  | Sprite.X or Target X = Sprite.X - (1*(Sprite.EaseTween.Progress*10))
    

    Didn't work.

    So has anyone else got a solution?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I solved this for my WIP game by using easeTween, Array of UID's. It's a bit complicated and until I finish the game I'm a bit reluctant to share capx :)

    When each instance is created I assign it to the corresponding Column ( I use floor(sprite.X / sprite.Width) to get 0-10 for 10 columns for example ) and store the UID's for each in a 2D array (GameBoard). When you remove an instance it's deleted from the array (set value to 0)

    To drop them I just add them and drop them by using easeTween(relative) setting Target X to (GameBoard.Height - ColumnCount) * Sprite.Height ( (10 - 2 )*80) . Setting easeTween with an easeBounceOut makes them look like physics objects too.

    When you remove a assets I call a function UpdatePositions which just run's through all the populated GameBoards UID's and counts how many blank spots are below. Repeat GameBoard.Height - Sprite.GameBoardY (repeats down 10-8) and then if Array's Spot is 0 add 1 to MoveAmount else do nothing.

    Then at the end it just move the Sprite it was testing by MoveAmount * Sprite.Height using easeTween again.

    Maybe if I get some time I can produce a stripped down capx to show.

  • Do you want to pick these 4 instances at random, or by the desired UID? If you want to pick them by UID, store the UID's in an Array.

    Random:

    System Repeat 4
    Pick Random (Instance) TileBackground3 | Set Visible
    

    Fixed:

    System Repeat 4
    (Instance) TileBackground3 Pick instance with (UID) Array.At(loopindex) | Set Visible
    
  • I suspect you can do this by loading a JSON file into array (which can be a local txt imported into the files folder in your project). But I haven't done/tried this, atm I just do the same as you as my arrays are small enough.

  • I can't seem to get this to work either, I have tried so many iteration of moving fonts and renaming them, I'm now just at a complete lost of what to do next.

    Currently I have the font imported into the "Files" directory in construct2 and it's name there is "Tw Cen MT Condensed Extra Bold.tff"

    Set my objects font to : "Tw Cen MT Condensed Extra Bold" and set an action to : Set font fact to "tw cen mt condensed extr abold"

    Something I've noticed is that in the CocoonJs Log is saying :

    Custom font loaded: game/fonts/twcenmtcondensedextrabold.tff
    Custom font loaded: game/fonts/tw cen mt condensed extr abold.tff
    

    Even though I have only included one font Cocoon is loading two both in lower case and one without spaces. I have tried renaming the files in C2 to be lowercase and without spaces and tried setting the font face to same, all with same null result.

    Is this not working because the fonts are loaded into 'game/' and not just 'fonts/'

    I have tried webfont (but that's not supported) and I have tried using a stylesheet like the tutorial.

    Soooo.... has anyone got a bullet proof way to do this?

  • lunarray: I'm sure I tried that but it didn't work and after seeing your post I tried again and it does. I think I was originally trying to do it with Compare two variables and couldn't find one for Group Progress(just individual instances). Any ways, after changing it to as you suggested that worked even better, so thank you :)

    Another question : is it possible to move and scale at the same time with same tween ease?

  • Looks like the URL for pricing is now blocked, so it's still WIP. Fingers crossed they heard/listened to our responsive on this.

  • At 49$ /m it's almost better to get adobes creative cloud membership with the cloud phonegap compiler plus the whole adobe suite. Not sure of phonegaps performance though.

  • Thank you for your help, I actually ended up doing this with a Function as your method wasn't giving me the results I needed. Should have done it from the start :(

    <img src="https://dl.dropbox.com/u/2175584/personal/forums/construct2/NstedConditions3.jpg" border="0" />

  • Really struggling to grasp this, thought I had Events and Variable/Instance Scoping understood but obviously not!

    I have tried to put a Pick All just before Pick with UID (as another condition and as parent/sub-event). Just to be clear I don't want to pick all instances, I just need the ones either side of parent.

    Below is a stripped down .capx (makes it smaller/easier to find events), wont compile but just so you could possibly position the events correctly for me <img src="smileys/smiley17.gif" border="0" align="middle"> cheeky I know but this is getting frustrating.

    https://dl.dropbox.com/u/2175584/Construct2Examples/NestedPickAll.capx

  • Still not getting anywhere with Nesting the conditions under a Pick All.

    I have also tried to assign the X/Y cords to a variable.

    <img src="https://dl.dropbox.com/u/2175584/personal/forums/construct2/NstedConditions2.jpg" border="0" />

  • I may have a solution for you but it could be considered "dirty".

    Firstly I set your layout to same size a project (640, 480), then I set "Fullscreen in browser" to "scale".

    Now on start of layout I set the scale of the layout to WindowsWidth / LayoutWidth ( if Windows was 1000 and your layout was 500 that would equall 2, so game is scaled up x2).

    Added a condition inside that to decide if scale by Width or Height is greater than 1 (if not don't scale), and also a min() to decided to scale by either Width or Height.

    Scale : min(floor(WindowWidth / LayoutWidth),floor(WindowHeight / LayoutHeight)) > 1 ? min(floor(WindowWidth / LayoutWidth),floor(WindowHeight / LayoutHeight)) : 1

    You'll need to do this to all your layouts.

    https://dl.dropbox.com/u/2175584/Construct2Examples/ScreenProblems.capx

labithiotis's avatar

labithiotis

Member since 4 Feb, 2013

None one is following labithiotis yet!

Connect with labithiotis

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies