dop2000's Recent Forum Activity

  • See my previous comment, I edited it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure I understand your question.

    The parent "On Timer" event will trigger for an Ally instance and will pick it.

    Then the nested "Ally has LineOfSight to Enemy" condition will pick all enemies in the range. And then you find the nearest enemy instance among those that are in range.

    I forgot that On Timer can sometimes trigger for multiple instances, so it's better to add For Each loop:

    Ally On Timer "find_new_target"
    System For Each Ally
    
     Ally has LineOfSightClose to Enemy
     Enemy pick nearest to Ally
     ----> Ally set enemyUID to Enemy.UID
     ----> Ally set state to "attack"
    
     Else
     Ally has LineOfSightFar to Enemy
     Enemy pick nearest to Ally
     ----> Ally find path to Enemy
     ----> Ally set state to "chase"
    

    You can save the selected target UID in the enemyUID instance, in case you need to pick the same enemy in other events, for example to fire a bullet at it.

  • Use Timer and LineOfSight behaviors. You can have multiple LineOfSight behaviors with different settings - for example one for long range, where the unit needs to move to the target, and another for close range where it can start shooting at the target.

    Use instance variables for states. And NEVER use "Trigger once" condition in state machine code!

    Here is a very simplified example, just to demonstrate the idea:

    On Start of layout
     ----> Ally Start recurring Timer "find_new_target" every 2 seconds
    
    
    Ally On Timer "find_new_target"
    
     Ally has LineOfSightClose to Enemy
     Enemy pick nearest to Ally
     ----> Ally set enemyUID to Enemy.UID
     ----> Ally set state to "attack" 
    
     Else
     Ally has LineOfSightFar to Enemy
     Enemy pick nearest to Ally
     ----> Ally find path to Enemy
     ----> Ally set state to "chase" 
    
  • In C2 you can make a similar chain with Pin behavior.

    dropbox.com/scl/fi/4o8syo1lzrehoefq46ocs/PinChain3.c3p

    It's a popular question - search the forum, there should be more examples.

  • This is C3 forum. You should've mentioned that you use Construct 2. I spent time making that demo..

  • You can try Follow behavior:

    dropbox.com/scl/fi/7cg90t64mgbzicjcr6ost/FollowSnake.c3p

  • Can you use a SpriteFont? It would be the easiest solution.

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

    Another option is effects, but they don't always work well with text objects.

    construct.net/en/make-games/addons/449/better-outline

  • could it be a construct update?

    This is easy to test - open the project in previous versions of Construct.

  • Invisible turrets should definitely fire. Pin also should work, or you can use hierarchy instead. Are you pinning visible sprites to turrets, or the other way around?

    Anyway, you are probably doing something wrong. Consider posting your project file.

  • Make turrets invisible. Put visible animated sprite on top of them and rotate it with events, or change its animation depending on the turret angle.

  • Paste this into your event sheet:

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"d-pad-left"}}],"actions":[{"id":"simulate-control","objectClass":"Player","behaviorType":"Platform","parameters":{"control":"left"}}],"children":[{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"button-x"}}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Run\"","from":"current-frame"}}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Cwalk\"","from":"current-frame"}}]}]},{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"d-pad-right"}}],"actions":[{"id":"simulate-control","objectClass":"Player","behaviorType":"Platform","parameters":{"control":"right"}}],"children":[{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"button-x"}}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Run\"","from":"current-frame"}}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Cwalk\"","from":"current-frame"}}]}]}]}
    
    
dop2000's avatar

dop2000

Member since 26 May, 2016

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