Kyatric's Recent Forum Activity

  • Example capx.

  • System expressions are what you're looking for question 1.

    The clamp() expression is listed in the category "Values" in the expressions dialog.

    For question 2 it looks like a ratio where you would divide the first value by 10 (or 100 ?) to get value 2.

    Also you should have a read at delta time and framerate independence and rethink your design (don't add a "fixed" 1 every tick, you'll have different executions on differently powered CPUs).

    Example capx.

  • I had made this example a long time ago.

    At the time functions weren't yet implemented in C2, but this example should still work.

  • You do not have permission to view this post

  • The latest version at the moment is r119.

    This is the version you need to have installed and make the export to arcade with.

  • "Is animation playing" is not a triggered event, it's a "state" checked every tick.

    Also the pseudo code ramones gave is executed like this :

    User click on a WPawn
    1 => If WPawn is playing "Unselected" animation
    1 ..=> Set the animation to "Selected"
    2 => Else (if WPawn is NOT playing "Unselected", so is playing "Selected" in this binary setup)
    2 ..=> Set the animation to "Unselected"

    Else will execute only if the previous event hasn't executed.

    If 1 is checked and found to be true, 2 won't be executed at all.

    If 1 is checked and found to be false, 1 won't be executed and so 2 is executed.

    (That's inherent to how events work)

    On one click, there can only be one state and one state switch with this code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe the examples listed in the how do I FAQ in the section "Layout" contain a clear answer/hint for your problem ?

  • Jeff Skyrunner: The sheets will load in the order you include them and finaly the including sheet will be loaded last.

    Ashley: Actually it has an impact if you're using several "On start of layout" events, spread in the included sheets.

    You have to make sure you're logical in what you make happen first, and/or about the values you might set to certain variables.

    Example. According to where/when you're setting the value and/or adding to it, you may have some unexpected result to someone not aware the included sheet is loaded first.

  • This ?

    If not, you should post your capx to show how you setted things so far.

    From the description in your first post it's hard for me to understand what you're exactly trying to do.

  • You may want to check how events work.

    Contrary to a "usual" coding language, the picking (selecting) of instance is done by the conditions in the events and the actions/expressions apply to the picked instances.

    In your example, when you click on a sprite, only this sprite is picked, and so it doesn't matter to refer to it through its UID or IID.

    You might also want to check in the how do I FAQ (link in my signature) at the section "Picking/Selecting instances" there are several topics worth checking and explaining all about picking in details.

  • You do not have permission to view this post

Kyatric's avatar

Kyatric

Member since 18 Aug, 2010

Twitter
Kyatric has 583,405 followers

Connect with Kyatric

Trophy Case

  • 14-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • x15
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x27
    Coach One of your tutorials has over 1,000 readers
  • x11
    Educator One of your tutorials has over 10,000 readers
  • x2
    Teacher One of your tutorials has over 100,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

23/44
How to earn trophies

Blogs