dop2000's Recent Forum Activity

  • Yeah, you can't abuse physics objects like that..

    I'm not sure what you can do to prevent it. Maybe add another event - if box is not on-screen, return it to the center of viewport.

    But it's really not recommended to change position of physics objects using non-physics actions or behaviors.

  • This is pretty bad.. What method did you use to build the apk? Have you tried the same project in C3?

    If you can make a small capx to reproduce this bug (maybe record a video or something), you should report it.

  • You can do something like this:

    On Right key pressed -> Player start "Step" animation
    
    On animation "Step" ended
     Keyboard Right key is down -> Player start "Run" animation
     else - > Player start "Idle" animation
    
  • Your problem is in this expression:

    touch.YforID(thumbstickstick.TouchID,"Controls")

    The second parameter ("Controls") is supposed to be layer name, in case you have layers with different parallax setting. And on your layout there is no layer with this name.

    So you need to change it to ThumbstickStick.LayerName or you can simply remove it:

    touch.YforID(thumbstickstick.TouchID,ThumbstickStick.LayerName)

    or

    touch.YforID(thumbstickstick.TouchID)

  • 2) Correct! Technically defining instance variables on families is the same as defining them on individual objects, but with families you can make your code more efficient and compact. If you add Health variable to each of your enemies sprites, you will have to add a bunch of almost identical events:

    If Zombie.Health<=0 then Zombie destroy

    If Vampire.Health<=0 then Vampire destroy

    ...

    If you add them to a family and define Health variable on the family, you can have just one event:

    If Enemies.Health<=0 then Enemies destroy

    .

    3) Yes, you can make one object with multiple animations instead of the family of objects. But what if you need animations to actually animate different states of the sprite (for example zombie running, zombie attacking)?

    Also, the cool thing about families is that you can add one object to several families, and use these families for different purposes!

    For example, you can have Zombie and Vampire in family Enemies, but also have Zombie, Vampire, Chicken and Player in family LivingCreatures. It will allow you to do this:

    Enemies on collision with Player -> Player subtract 1 from health

    LivingCreatures on destroyed -> LivingCreatures spawn BloodSplatter

    .

    4) In programming true is 1 and false is 0.

    So the formula (variable=0) can either return true (1) or false (0). If variable was 0, the result will be 1, and if variable was 1, the result will become 0.

    Here is another compact way to toggle a variable: Set variable to (variable=1 ? 0 : 1)

    This means "if variable=1 then 0, else 1".

    And of course you can do this the long way with two events:

    If variable=0 : Set variable to 1

    If variable=1 : Set variable to 0

  • When you create new objects in runtime, they inherit properties not from the family, but from that one object instance which you placed on the layout in editor. You know how Construct requires at least one instance of each sprite to be placed on the layout? This instance is used as a reference to create all other instances of this sprite in runtime.

    So, for example, if you define "Health" instance variable on the family Enemies, you can still set different default health for each enemy type.

  • You think of a family as of one big object, which is wrong. There is no such thing as "family visibility". When you create an instance variable on a family, what actually happens is you are adding a copy of this variable to each member of the family.

    So each sprite has its own copy of this variable, and each instance of the sprite has its own value in this variable. If you toggle it for existing instances (setting it to true) and then spawn new instances (with default value of false), you end up with a mix of true and false values.

    .

    Like I said, if you want to control visibility of all family instances at once, you need a global variable:

    If bDebugVisibleGlobalVar=1 -> Family_Debug_Sprites set visible
    Else -> Family_Debug_Sprites set invisible
    

    To toggle it between 0 and 1 you can use this expression:

    Set bDebugVisibleGlobalVar to (bDebugVisibleGlobalVar=0)
    
  • julianlee

    Maybe this phone has a slightly different version of the font or text scaling setting etc.

    Have you tried making the Text Box bigger (both wider and taller)?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • b_DebugIsVisible is an instance variable. This means that each sprite instance in this family has its own value in b_DebugIsVisible.

    If you want to toggle visibility for all sprites, you need to use a global variable.

  • Also, when you are moving or rotating physics objects, you should only use Physics actions (apply force, apply impulse, set velocity).

    Try not to change their angle or position directly or use any other non-physics behaviors like Bullet, Rotate, Pin etc.

  • C3 does have an Array Editor.

    In C2 I like using CSV plugins - you create a table in Excel, save as CSV and import to Construct. CSV is a text file, so it's easy to make changes to it.

  • Round(number/4)*4

dop2000's avatar

dop2000

Member since 26 May, 2016

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