dop2000's Recent Forum Activity

  • Ok, I'm tired of trying to tell you that the problem is not with the behavior. The problem is with your joystick code!

    I repeat what I told you in my first comment - if you want correct collisions with solids, don't use "Move at angle" action to move your tank. It's not compatible with 8direction behavior!

    Only use 8-direction native actions - "8Direction Simulate control" and "8Direction Set vector X/Y". Then your tank will move correctly up and down when touching solid walls.

    .

    Formulas for "Set vector" actions are:

    Set vector X to cos(angle(.....))*speed
    Set vector Y to sin(angle(.....))*speed
    
  • Ok, does this problem happen when you control the tank with the keyboard on desktop?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, I understand, but how do you control the tank when this problem happens? With keyboard keys, or with the virtual joystick?

  • Yeah, ok

  • If you are saying that ID instance variables match IDs in the array, then your loop should work. If you can't fix it, you'll need to post your project file.

    Why are you duplicating all variables in the array? If you are not saving the array in local storage or uploading it somewhere, then I don't see why you might need it.

  • How do you know that picking doesn't work? Have you tried moving that textDebugging action into the sub-event?

    Like Allan said, it's difficult to understand what you are trying to do from that screenshot. You need to explain what all these IDs and arrays are for, or post your project file.

  • Run the game in Debug Mode, check enemy instances and their IDs. Check the contents of the array. Maybe you will be able to see what's wrong.

    By the way, your loop should be from 0 to (Enemy.count-1)

  • No, you need angle() expression.

  • Trigger once will not help if you are switching to another layout and back.

    Add a boolean variable TitlePlayed. On start of the layout check if TitlePlayed=false, then play the title and set TitlePlayed to True.

  • I have a demo:

    dropbox.com/s/hnhepai660anaf4/ScrollingListOfPlayers.capx

    You can find more examples on this forum.

  • You can try "Local Storage On any item get". Inside this event extract the ID, for example with the tokenat expression:

    Set id to int(tokenat(LocalStorage.Key, 1, "_"))

    And then pick the object instance with this ID.

    I don't know if this event will be triggered for each key separately though.. You will need to test.

    Alternatively, you can put all values into an array and save the entire array in LocalStorage as one key.

  • See these tutorials, they are not exactly what you need, but can give you a general idea:

    construct.net/en/tutorials/animation-management-in-8-direction-games-712

    construct.net/en/tutorials/4-direction-animation-503

    In your case you will need to compare the angle from the character to mouse cursor. So you might use conditions "System is between angles" , with expression angle(Character.x, Character.y, Mouse.x, Mouse.y)

    For example:

    angle(Character.x, Character.y, Mouse.x, Mouse.y) is between -45 and 45 gegrees
    	Character set animation "Right"
    
dop2000's avatar

dop2000

Member since 26 May, 2016

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