dop2000's Recent Forum Activity

  • LiteTween is an overkill for this task if you just need a linear change.

    X=X-300*dt is the easiest formula

    If you don't care about it taking precisely 1 second, you can simply subtract 5 every tick:

    X=X-5

    At 60fps it would take approximately 1 second to decrease by 300.

    You can do this with lerp if you want, but you will need another variable "t":

    t=t+dt

    X=lerp(-300, -600, t)

  • If you need to change from -300 to -600, that's actually decreasing

    Try this:

    X=X-300*dt

    This should decrease X by 300 every second.

    To stop after 1 second, you can either set a condition "If X>-600" or add Clamp() or Max() expression, for example:

    X=Max(-600, (X-300*dt))

    If you want easing effects (speeding up/down etc), you can install LiteTween behavior.

  • Why did you remove 4 actions from the "DisplayINVContent" function? Restore them and your inventory will work.

    Did you delete and then re-added invCell sprite or Collectibles family? You should be careful when you delete an object in C2, as all events and actions mentioning this objects are automatically removed from the event sheets.

    I suggest you compare your code with the previous version (the one you uploaded a few days ago) to make sure nothing else is missing.

  • sean080

    It's the same check as in my example - if distance between two sprites less than some value, then enable bullet behavior.

  • See this example:

    The system will check event 1. If it's true, other checks will not be performed.

    If 1 is false, then event 2 will be checked.

    If 2 if false too, then event 3 will be executed.

  • You can have several Else conditions:

    A=1  ....
    B=1
    
    Else   ....
    C=1
    D=1
    
    Else ....
    [/code:1ym1hzxh]
    
    I should note that this kind of programming is not very efficient. If you have lots of events like this or add more variables, your code will soon become very difficult to manage. You should probably choose another way to store all these values, maybe a dictionary, or an array. You can store recipes  as strings of keys: (BigTowerRecipe="burger,piper,maioneza") and use tokenat, tokencount to parse them and loop through the dictionary to check if ingredients are available.
  • In physics game you can create an invisible solid circle, pin it to the object and it will push other objects away.

    Without physics you can do something like this:

  • You tell me!

    What is your next problem?

  • Make a sprite with X icon. Create/spawn this sprite when you need it, then destroy.

    You can add a fade behavior, it will destroy the sprite for you after fading out.

    Alternatively you can keep this sprite invisible and toggle its visibility.

    Or keep it off the screen and move it to the screen when you need to display it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check collision polygons and origin image points of your sprite. Ideally the collision polygon and origin image point should be the same for all frames/animations.

    Incorrectly positioned image point on a single frame could trigger unexpected falling/jumping/collision events.

  • The only way to do this is to add an instance variable "type" to the family. Set type="A" for sprites A, type="B" for sprites B etc.

    Then you will be able to pick family members by type and loop through them.

  • What do you mean "no longer working"?

    Tokencount works and you can use it to validate email address format, but you need to create several conditions:

    tokencount(emailText, "@")=1

    tokencount(emailText, ".")>0

    tokencount(emailText, ",")=0

    tokencount(emailText, " ")=0

    etc.

    Those are some basic checks, if you need a more strict validation, you can create a string of all characters that are not allowed in email and do something like this:

    charList="`:;'<>,/?\"   <-- this is just an example, not the actual list of restricted characters
    For x=0 to len(charList)-1
       tokencount(emailText, mid(charList,loopindex,1))=0
    [/code:1sinvf5u]
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 247 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
  • x4
    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