dop2000's Recent Forum Activity

  • No, instance variables. You have them on some other sprites, for example your PlayerBattle sprite has instance variable "health".

    Instance variables is a powerful thing, you should use them more.

    Create instance variable "startX" and "startY" on the Letters sprite. Set them to each letter's position on start of layout.

    This will allow you to return any letter instance to its original position when needed. Say, when it's dropped not on the grey box.

  • Just remove the quotes:

    Set position to (BlockMoveable(21).BBoxLeft-2, .....

    As for the second part (int(selectedObject & ".BBoxTop")), this will not work. You can't refer to objects in C2 by their string name. Same applies to expressions.

    It's hard to tell what are you trying to do from the screenshot. If multiple objects/sprites can be selected, then one possible solution would be to add all such objects to a family. Use SelectedObject variable to store UID of the selected instance.

    Then do this:

    MyFamily -> Pick by unique ID = SelectedObject

    .........HighlightBox Set position to (BlockMoveable(21).BBoxLeft-2, MyFamily.BBoxTop-2)

  • max2612 It's on the properties panel:

  • Two ways to do this:

    1. Use System->Set Time Scale=0 for the object with Timer. This will stop everything for this object.

    2. Save timer remaining time in a variable (I believe it's object.Timer.Duration-object.Timer.TotalTime)

    Then stop the timer. After player answered the question, start the timer again for the remaining time.

  • NeronSparda

    Mayfly

    Here are my thoughts -

    I think Bullet behavior would be a poor choice for a billiards game, it's very inaccurate. Physics may work a little better as you can set "Collision mask=circle" for balls, but I'm still not sure.

    If you want precision, you will need to calculate reflection angles and collision points in advance. Collision points too because a fast moving ball can travel long distances in one tick and if you rely on C2 collision detection, it will also be very inaccurate.

    You can also try these plugins:

    https://c2rexplugins.weebly.com/rex_light.html

    plugin-jcw-trace-raycast_t172320

  • Are you moving the sprite with Bullet behavior?

    If yes, disable "Set angle" in Bullet settings.

    Then use Bullet->Set angle of motion -> Angle (sprite.x, sprite.y, destination.x, destination.y)

  • Darxoon

    Say you have Enemy sprite with instance variable Health.

    And you want to count all enemies with full health and display this number in MyText.

    Add event

    Enemy -> Compare instance variable Health=100 -> MyText set text to ("Enemies with 100% health:" & Enemy.PickedCount)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Local Storage has nothing to do with layers or layouts.

    It's just a method of storing data. What data you store and when in the game you retrieve it - it's up to you.

  • Well, if you want the bullet to immediately change angle, you can remove the alnglelerp part.

    Simply set angle to angle(Self.X, Self.Y, Target.X, Target.Y)

    anglelerp was to make the trajectory smoother.

  • Try this:

    Every tick -> BulletSprite set Angle to anglelerp(Self.Angle, angle(Self.X, Self.Y, Target.X, Target.Y), dt*4)

    In Bullet behavior set "Set angle=Yes"

  • What you probably looking for is Else condition.

    If condition A -> action A

    else -> action B

    You can also use other conditions after Else:

    If condition A -> action A

    else if condition B -> action B

    else if condition C -> action C

    else -> action D

    "Else" can't be used with triggered events like "On created" event on your screenshot.

    Triggered events have a little green arrow and usually start with "On.."

    You can see the list of all expression in the expression editor, there is a semi-transparent window with all objects in your project. If you click System for example, you'll find all system expressions.

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 22 Feb, 2025

Twitter
dop2000 has 260 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