dop2000's Recent Forum Activity

  • You can't do this with standard C2 events, but it's possible with JS code.

    Here is a somewhat similar plugin that detects faces in images.

    viewtopic.php?t=72970&start=0

    https://github.com/JohnnySheffield/C2_P ... facedetect

    If you are familiar with JS, you can probably modify this plugin for color detection using tracking.js library from the link you posted.

  • There are two built-in Physics engines in C2 - Box2D Asm and Box2D Web, have you tried both?

    Also, you can try using Chipmunk, it might work faster:

  • jezjones24

    To open a capx created with newer version of C2, rename it to zip, unpack to a folder, open .caproj file in Notepad and edit this line:

    <saved-with-version>24600</saved-with-version>

    (I post this advice so often, I should add it to my signature )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a couple of plugins that extend textbox capabilities, you may find them useful:

  • The music normally doesn't stop when you change layouts. You don't need to do anything.

  • I don't like TextBox, it's ugly (for games), impractical, hard to customize.

    If I needed a simple text input for my game, I would probably make my own custom "textbox" using Text or SpriteFont object.

    Shouldn't be too hard - read keyboard input to add or remove characters. Use symbol "|" for cursor, blink it every second (replace with " "), move cursor with arrow keys.

    Setting cursor to mouse position could be tricky, but still possible with SpriteFont as you can get the exact size of each character.

    Of course if you need text selection, copy-paste functions - this will require more effort.

  • Christmas Pin and Platform behaviors are not compatible with physics. Yes, they work together, but not very good.

    I'd also like to know how the author of that video did it. I don't think it's something simple though, his engine is probably quite complex.

    He might not have used Platform behavior at all. It's possible that all platform movements are replicated using physics actions (apply force, impulse, velocity etc).

  • I'm still on release 246 and don't have these issues.

    , have you tried installing an older version of C2?

    You will still be able to open your projects saved in later version if you edit this line in .caproj file:

    <saved-with-version>24600</saved-with-version>

  • You can change the size of your TextBox, but as for the word wrap - not sure if it's possible. Maybe with CSS?

    Use TextHeight and TextWidth expressions of the Text object to get actual text dimensions and resize the Text object accordingly. The only problem is that the system needs at least 1 tick (or longer for web fonts) to render the text before TextHeight and TextWidth become available.

    So it works like this:

    TextObject set Text to "Hello world!"

    Wait 0

    TextObject set Width to (Self.TextWidth+5)

    TextObject set Height to (Self.TextHeight+5)

  • Run your game in Debug Mode (Ctrl-F4)

    Find Score_Soldier in the list of variable and see what happens with it, what value it holds.

    Also just as an experiment change you action to Score_Soldier_Text -> Set Text to "1234567890"

    See if this sprite font object can display numbers.

    If nothing helps, please share your capx. It's impossible to find the problem with just your screenshots.

  • Are you saying that all blue boxes have the same FallSeconds value?

    I really don't like using events like "Every x seconds" and "Trigger once" inside of the loops.

    Try removing "trigger once" and move "Every 0.1 seconds" above the "For each" loop. See if it fixes the problem.

    If not, I suggest you enlarge your text field and add some debug output to the loop (because "Cursor is over sprite" is not a reliable method).

    So you can do something like this:

    Every 0.1 second
    For each Egg_collisionCheck    Text append newline
       cos(....)>50  Add 0.1 to FallSeconds
                     Text append "ID:" & Egg_collisionCheck.IID & "+0.1=" & Egg_collisionCheck.FallSeconds &"  "
       Else          Set FallSeconds to 0
                     Text append "ID:" & Egg_collisionCheck.IID & "reset  "
        
    [/code:2qembwov]
    
    This will help you to understand what exactly is going on.
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 280 followers

Connect with dop2000

Trophy Case

  • 10-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
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies