RafaelMatos's Recent Forum Activity

  • If you wanna check for that string in the name you can use:

    find(LayoutName, string)

    ex: find("1ABCDx2", "x2") would return 5.

    If you wanna get the string from the name you can use one of the expressions below:

    left(LayoutName, count)

    right(LayoutName, count)

    mid(LayoutName, index, count)

    ex:

    left("1ABCDx2", 1) would return "1".

    right("1ABCDx2", 2) would return "x2".

    mid("1ABCDx2", 1, 2) would return "AB".

    And you could even use both together:

    mid("1ABCDx2", find("1ABCDx2", "A"), 2) would return "AB".

    Thank you, brunopalermo.

  • > When you have two sprites with both scroll to behavior enabled at the same time it wont work. Ensure that you have only one scroll to behavior enabled.

    >

    The docs say that you can set ScrollTo on multiple sprites. The Viewport will (will try) to center between the two sprites. I didn't try but I doubt this works.

    I didn't make myself clear I guess. I meant that It wont work properly because, as you said the camera will try to follow the center between the objects which I believe is not what we usually want.

  • Is it possible to get a specific letter or number in a string type value?

    Example:

    Retrieve LayoutName (Which is 1ABCDx2) and get x2, or AB, or 1, etc.

    It's easy for numbers but for string I don't even know if it's possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you have two sprites with both scroll to behavior enabled at the same time it wont work. Ensure that you have only one scroll to behavior enabled.

  • I've solved by using the viewport. Here it is in case someone need.

    Set position to:

    X = abs(ViewportLeft("Interface") +ViewportRight("Interface"))/2

    Y = abs(ViewportBottom("Interface") +ViewportTop("Interface"))/2

    This will get the current min and max pixels of the screen, sum them and divide by 2 to get the center. Do it for the X and Y axis.

  • I've tried everything.

    X= WindowWidth/2

    Y= WindowHeight/2

    X= LayoutWidth/2

    Y= LayoutHeight/2

    Scrollx

    Scrolly

    Nothing works. I thought it would be easier to do such an usual thing. Am I missing something?

    Thanks!

  • thanks a lot...could u post a capx . that's easier 4 me to understand...thank u so much

    [attachment=0:sbiper59][/attachment:sbiper59]

  • While pressing a button or touching - > set scale to lerp(a,b,c)

    a = start point

    b = destination point

    c = "Transition's velocity"

    For the c, use 1*dt,2*dt,3*dt, etc

    Don't forget to always use dt (delta-time)

    Example:

    lerp(1,3,1*dt) ==> Went from scale 1 to 3.

    Remember that you can always use expressions to get the current scale for the "a" and then use it again on "b" plus any number that you want to add ou subtract in order to zoom in and zoom out.

  • hyem

    2400px isn't high man. You are fine about that =P

  • Mobile devices are not a goal, but there's no reason why it shouldn't work there. My target is first getting all the features working well first with a good design for the events. If i encounter any major problems I'll try to adress them as they come up, and every export platform should benefit from it.

    Alright, thanks for the answer.

  • As far as I know, layout size doesn't interfere on that. The game processes everything that is ON screen only.

  • It should be just as possible as using box2d. That being said I don't know how this compares to box2d in performance on mobile devices.

    So mobile devices aren't your goal? Because, regarding to performance, Box2d isn't that great.

RafaelMatos's avatar

RafaelMatos

Member since 8 Mar, 2014

Twitter
RafaelMatos has 1 followers

Connect with RafaelMatos

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies