Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Geners
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Geners

    @Geners

    9
    Posts
    1321
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Geners Follow

    Posts made by Geners

    • Is there a way to check to body parts of a creep?

      I want my creeps to attack healers first if there is any in range but in order for me to do that I need to be able to find some array that holds a list of their body parts. Does any such member variable exist within the creeps object?

      posted in Help
      Geners
    • Community updates

      It would be really nice to have more community functions to the site. A bigger forum, pings so you know when people have replied to you or your topics, private messages, friends lists. It would make this feel more like a community driven game and less like a single player tournament.

      posted in Feature Requests
      Geners
    • Healers trying to heal themselves.

      A lot of people (me included) run into an issue where when we make a healer class where the healers purpose is to heal the closest ally to them, they often just stop functioning when they get hurt.

      Welp, it's an easy fix. The healer is just trying to heal itself which is the closest wounded thing to it, which is can't.

      SO we do this

      var target = creep.pos.findClosest(FIND_MY_CREEPS, {
      
          filter: function(object) {
      
              return (object.hits < object.hitsMax) && (object.name != creep.name);
          }
      });
      

      Basically we just tell our healer creep, that if the person he finds damaged is himself, move on to the next person.

      posted in General Discussion
      Geners
    • RE: Issue with creep.moveTo

      I figured out the problem

      in main I put if(creep.memory.role = 'tower') instead of if(creep.memory.role == 'tower') i forgot to add a = sign to switch from an assignment operator to a logical equals operator. Thanks guys!

      posted in Technical Issues and Bugs
      Geners
    • Issue with creep.moveTo

      I have a harvester module

      module.exports = function(creep) {
      
          if(creep.energy < creep.energyCapacity) {
              var sources = creep.room.find(FIND_SOURCES);
              creep.moveTo(sources[3]);
              creep.harvest(sources[3]);
              }
          else {
              creep.moveTo(Game.spawns.Spawn1);
              creep.transferEnergy(Game.spawns.Spawn1)
          }
      
      }
      

      and I have a tower module

      module.exports = function(creep,towerStart) {
      
           var enemy = creep.pos.findClosest(FIND_HOSTILE_CREEPS);
          if(enemy) { 
              creep.rangedAttack(enemy);
          }
      
           creep.moveTo(TowerStart, 32);
      }
      

      But when I run both of them, my harvesters instead of harvesting materials, they movetTo the area where my towers are supposed to go and my towers do not move. It's not a problem with memory because if I take out that moveTo in the tower module both creep types work fine.

      posted in Technical Issues and Bugs
      Geners
    • I wish I could get my friends into this game

      But I'm the only person in my friend group interested in programming.

      posted in General Discussion
      Geners
    • How can you tell if you've defeated an enemy?

      Is there some kind of function or something that checks if an enemy is defeated?

      posted in Help
      Geners
    • RE: Small snippet to clear the memory of dead creeps.

      Is this just to free up memory? Or?...

      posted in General Discussion
      Geners
    • In PVE mode my

      Guards I create always go for the two red dots at the top center.
      I have them set to attack Game.creeps.guard1.room.find(FIND_HOSTILE_CREEPS);
      I store this in a variable and then I use it as a target target[0] for my guards to fight. However I don't think I fully understand how the find array works. Does [0] not give me to closest enemy objects but something else?

      A brief explanation of what find returns might suffice.

      posted in Help
      Geners