dop2000's Recent Forum Activity

  • There are a few expressions related to angles:

    angle(x1, y1, x2, y2) Calculate angle between two points

    anglelerp(a, b, x) Linearly interpolate the angle a to b by x. Unlike the standard lerp, this takes in to account the cyclical nature of angles.

    anglediff(a1, a2) Return the smallest difference between two angles

    anglerotate(start, end, step) Rotate angle start towards end by the angle step, all in degrees. If start is less than step degrees away from end, it returns end.

    You're probably looking for anglediff, although you should know that it always returns positive result. I.e. anglediff(10,50) returns 40, and anglediff(50,10) also returns 40 (not -40).

    Also these system events may be useful: "Is between angles", "Is within angle", "Is clockwise from"

  • Oh, so you are using some external "HTML" plugin, like this one?

    I don't know anything about this, sorry. Maybe you can disable resizing with CSS, or if you know javascript you can try to change this in plugin source code. Or try another plugin, I think I've seen a few similar ones (for C2 at least).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you explain in more detail what are you trying to achieve?

  • If a variable is only used in events from one group, you should consider moving this variable to this group. This helps to de-clutter your project. Local group variables are only accessible by events in this group.

    You should be aware, that local group variables are reset between calls. So it's not a good idea to put a variable like GameScore in a group, because it will reset to default value all the time.

    If you want your Local variable to keep its value, you need to change its type to Static. The problem with Static variables though is that if you need to reset them, you'll have to do it for each variable ("System Set GameScore to 0"). Unfortunately, there is no "Reset all static variables" action in C2.

    Same rules apply to local variable defined inside of events.

    As far as I know, "Include" does not have effect on Global variables. Global variable defined in one Event sheet is visible to the entire project, no matter if this event sheet is included into other event sheets or not.

  • Don't use Button or other form controls. They are not "native" to Construct, there are lots of issues with them.

    They may be ok for some types of games like quizzes, but I wouldn't use them in a platformer.

  • So you want your character to be always in the center of the screen? Simply add ScrollTo to your character then.

  • I'm not sure if this a good method, but it seems to be working:

    Create an object (sprite for example), set Global=Yes, add NoSave behavior to it.

    Add instance variables that will store the items you bought. When player buys something in the shop, put it in these instance variables.

    In "On Load Complete" event read these variables and add the items to player's inventory.

    Or I guess you can do this with Local Storage. When exit from the shop, write all inventory into the local storage.

    In "On Load Complete" load inventory from the local storage.

  • robotpencil I think you can do the same with 8-Direction. Disable standard controls, set acceleration=10000, deceleration=0, On key pressed simulate controls.

  • There was something wrong with your project, some bug maybe. I created a new project with the same Physics movement and scrolling and couldn't reproduce the jittering.

    So yeah, use 8-Direction and everything will be fine.

  • No problem, glad I was able to help!

    And it didn't take any time at all

  • I think you can still use "find". And if you want to pick TextObject with your event, do this:

    System -> Pick by comparison -> TextObject where find(TextObject.text, "Shooter")>=0

    This will pick all TextObjects which contain this word.

  • I think what you are looking for is the find() expression:

    Set variable S to "The quick brown fox jumps over the lazy dog"
    
    System-> Compare two values -> find(S, "fox")>=0   
    [/code:5lcduap9]
    
    find() expression returns position of the string ("fox") inside another string (S). 
    It returns -1 if string was not found. So if the result >=0, this means that the string was found.
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 256 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • 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
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies