dop2000's Recent Forum Activity

  • No worries!

  • Yes, it's a workaround, but it's a legit workaround

    I think I saw it in one of the official tutorials.

    I guess you can do the same with a function. If sprites are overlapping, call a function, pass sprite UID as a parameter. Inside the function pick all sprites with UID<>param(0), check overlapping again and... not sure what's next. I remember doing something like this, but I don't remember how

    The method with the family is much easier.

  • Create a family with this sprite and use it to refer to another instance of the sprite in the same event.

    E.g.:

    For each Sprite

    ...Sprite overlapping SpriteFamily

    ........SpriteFamily Set Invisible

    ........Sprite Set Visible

  • Thanks, BadMario!

    I have many boxes on the layout that may move chaotically and fall on each other all the time, so turning Physics on/off is not an option. I only turn it off when box is dragged.

    I am trying to make stationary boxes Immovable. If this doesn't work well, I'll probably have to switch to ChipMonk.

  • I think the problem is related to the way C2 processes events, not to image points.

    I've seen the same lagging with Pin behavior:

    Create sprites A, B, C

    Add bullet behavior to A

    Pin B to A

    On every tick set C position to B.

    You'll see C lagging, probably because Construct 2 adjusts position for pinned object after all other events.

  • You mean in runtime? Pretty sure it's impossible.

    Could you tell why do you need to dynamically create layouts? If this is for procedural map/level generation, there are plenty other ways to do this, check the FAQ and tutorials:

    how-do-i-frequently-asked-questions_t63692

    https://www.scirra.com/tutorials/all

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks R0J0hound,

    Chipmonk seems to work much better! There is no shaking or sliding and objects go to sleep pretty quickly.

    The only problem I noticed so far is that there are no properties displayed in Debug mode..

    I'm a bit cautious about using such complex custom behavior in my game. Do you know if there are any issues with it working on different mobile platforms?

  • There is another way to toggle boolean using ternary operator:

    value = (value ? 0 : 1)

    (value ? 0 : 1) means "if value is true, then 0, else 1"

  • In any programming language False=0 and True=1.

    When value=0, the expression (value=0) will return True and value will become 1.

    When value=1, the expression (value=0) will return False and value will become 0.

  • I think your second event is executed after the first one, and it sets the value back to 0.

    You should move your second condition to a sub-event:

    If Q pressed 
           Value = 0   -> Set Value to 1
           Else        -> Set Value to 0
    [/code:wnkayh43]
    
    Also, there is an easier way to toggle boolean variable, in just one line:
    If Q pressed -> Set Value to (Value=0)
  • You can use Angle(0,0, Touch.Gamma, Touch.Beta) to determine the angle of movement

    and Distance(0,0, Touch.Gamma, Touch.Beta) to determine speed factor.

    How do you use these values is up to you. I tried them with Bullet behavior and it works like a charm.

  • It's hard to understand your problem..

    Can you share your capx file?

    Also your code looks really inefficient and cluttered.

    If you have lots of dialogs in your game, I suggest you look at these tutorials (they all include example capx):

    zelda-dialogue-system-capx-and-demo-included_t182559

    https://www.scirra.com/tutorials/807/ho ... -game-talk

    https://www.scirra.com/tutorials/833/a- ... e-anywhere

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