Announcement

Collapse
No announcement yet.

Ushhan's Source Code Attempt

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I have the movement code working now. It was a problem with the path finding not pathing across the fog of war.

    Currently, I am trying to use an army to attack an enemy unit/city. Can someone guide me to the file/functions that might be helpful. I have been looking around but cant find any place to start.

    Thanks

    Cheers,
    Ushhan

    Comment


    • #17
      armydata.cpp
      armyevent.cpp
      cityevent.cpp (for capturing the city)


      any chance you can work your code to do rebasing for immobile 9cantmove) units? like in civ3. the teleport but knowledge of the movement code will help in doing this.
      Formerly known as "E" on Apolyton

      See me at Civfanatics.com

      Comment


      • #18
        Does anyone know the correct usage of the following:

        Code:
        Unit Army::GetTopVisibleUnit(PLAYER_INDEX const looking_player) const
        It doesnt seem to work the way I think it should. From what I can understand, it should give me a visible unit which is on the top of the list of units visible from the army that this function is called from. It gives me wierd results. If I am using an army of player one and I put the looking player as 1, it gives me a its own unit, rather than the other one in its sight.

        E, I am not too sure of the functionality you want to implement. I am currently very busy with finishing my MS, but will be happy to help out. Is there a way I can post my existing code file, so that anyone can have a look and use it if required?

        Thanks

        Cheers,
        Ushhan

        Comment


        • #19
          i think the top visible unit is what the player sees of any stack on the map. I've seen it used in the bombard code though.

          you can zip or rar the files that you changed, either by posting a reply (by hitting the button) or using the upload service with the upload link at the top
          Formerly known as "E" on Apolyton

          See me at Civfanatics.com

          Comment

          Working...
          X