Lootzifr's Recent Forum Activity

  • You do not have permission to view this post

  • LaroTaio

    Who many enemies will be on screen? I think this part of code could produce overhead. E.g. if there are 10 enemies on the screen they will all check every tick if they have line of sight. With the second part you want to create the alteration of time between two shots. I would recommend to use a "timer" for it. So when an enemy shoots you set a timer for "not being idle to shoot / reloading / waiting" (however you want to call it^^). Timers trigger automatically a state as soon as done. So you can not only use it for something like a bomb (trigger on finished) but for "is not counting down / blocked" right now. I would do it like this:

    Every 0.1 seconds

    -> check for enemies that are not "reloading" then

    --> check if they have "line of sight"

    If both is true spawn a bullet (shoot) and activate the timer of that enemey with a random number. I think sometimes it helps to try to put the code in human readable sentences or scenarios. E.g. your code above says:

    the system is stressed and asking ten enemies on the layout every tick: "hey guys, do you have line of sight towards the player?" - three say "yes" and think (may we should? we are idle, never fired ever before). Seven say "no" (we don't see the player) The system want to give the order to fire but wait! System is cheking its watch and says: "sry guys, we can only shoot if the pointer for seconds is at 12 because you need time to reload. this will be in 6 seconds but never mind I will ask you 360 (60 ticks x 6 seconds) times until then if you have line of sight but won't give the order to fire". Enemies: "we don't need to relaod <img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad"> "

    So the core question is why should everybody wait together. By timer you can tell single enemies to reload (wait). It doesn't matter if they have line of sight. So to give my example as a story:

    the system is chilled and asking ten enemies on the layout every 6 ticks: "hey guys, please, everybody that is not currently reloading listen to me". All of them are answering "hey, we are idle" (but if some would say reloading that enemies would not listen anymore. The system says: "please check if you have line of sight to the player". Two enemies answer "yes, we do". system says: "ok fire and then you wait/reload". The system is randomly giving these two enemies tickets with numbers on it which says "reload 1 second" or "reload 2 seconds".

    https://www.scirra.com/manual/167/timer

  • DarrenCurtis

    omg, very professional, very talented! I love "it's not over". Where are you based? Please PM me. Always looking for more music tracks for my game Battle Wizard Attack.

    Cheers, Marco

  • Sounds like a lot of work. Do you want to run this mobile at the end? I would recommend to work on the RPG part first. You can use 8 direction or custom movement in combination with solid objects and tilemap to create such a world. The fighting part could/should be on a different layout then and make the RPG world persistent.

  • cute grafics

  • You do not have permission to view this post

  • SteveKane You need to create a leaderboard in your Google Game Console - Game Service first. Then you will have your ID.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • there is a more detailed logfile you can check what went wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Please provide screenshot of all steps if you need help. I can't tell whats going on without. Pls submit it here or per PM.

Lootzifr's avatar

Lootzifr

Member since 3 Oct, 2012

Twitter
Lootzifr has 160 followers

Connect with Lootzifr

Trophy Case

  • 12-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

22/44
How to earn trophies