Announcement

Collapse
No announcement yet.

Scenario Events and stuff

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

  • #31
    Ive changed my mind on that telling the units where to move thing. I think itll produce a very rigid scenario so ill just stick to spawning units at random. Thanks though Martin.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

    Comment


    • #32
      Okay its back to the grind just one question this time.

      I want to create units buildable by each city, now ive got ALOT of cities and i want to know how to reference many cities in one piece of code, okay it sounds confusing, thats just cause im confused.

      Code:
      	GetCityByLocation(alexandriaLoc, tmpCity);
      	if (CityIsValid(tmpCity)) {
      		if (tmpCity.owner == 1) {
      			if (theUnit == UnitDB(UNIT_CHURCHILL_TANK) || 
      				theUnit == UnitDB(UNIT_VALENTINE_TANK) ||
      				theUnit == UnitDB(UNIT_MOSQUITO) ||
      				theUnit == UnitDB(UNIT_SPITFIRE) ||
      				theUnit == UnitDB(UNIT_LIGHT_TANK) ||
      				theUnit == UnitDB(UNIT_FIELD_ARTILLERY) ||
      				theUnit == UnitDB(UNIT_AA_ARTILLERY) ||
      				theUnit == UnitDB(UNIT_MOTORIZED_INFANTRY)) {
      				return 1;
      			} else {
      				return 0;
      			}
      		}
      	}
      Okay how do i define alot of cities to build these particualr units in one piece? Obviously because i dont want to pour out this code for every city. Help is greatly appreciated.
      Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
      CtP2 AE Wiki & Modding Reference
      One way to compile the CtP2 Source Code.

      Comment


      • #33
        Probably the easiest way (or rather, the way I would do it I think) is to define a group of units like you've done there, and put all the cities you want to be able to build them into an array such as BRITCITY[];
        then do something like this:
        Code:
        int_t i;
        if(theUnit == UnitDB(UNIT_CHURCHILL_TANK)
        || //blah blah ){
               for(i=0;i<  BRITCITY.#; i  = i + 1){  
                     if(tmpCity == BRITCITY[i]){
                           return 1;
                     }
                return 0;
        } 
        elseif (//other units....
        }
        Concrete, Abstract, or Squoingy?
        "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

        Comment


        • #34
          Can someone remind me the password for the modmakers ftp? I searched for the last time someone reminded me but couldnt find it

          Im gonna put all the work i did on this scenario up there and get rid of all these backups. Maybe someone can take a look at it sometime or i can come back to it without digging though a thousand unmarked discs.
          Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
          CtP2 AE Wiki & Modding Reference
          One way to compile the CtP2 Source Code.

          Comment


          • #35
            PMed
            Concrete, Abstract, or Squoingy?
            "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

            Comment


            • #36
              thanks IW

              Okay so uploaded weighs in at about 8.1Mb thats about the smallest i could get it without zipping every folder, and its not a completed scenario for anyone scanning this. Theres all the planning crap i did aswell in there, like what sprite is what and screenshots of each.

              Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
              CtP2 AE Wiki & Modding Reference
              One way to compile the CtP2 Source Code.

              Comment


              • #37
                Forgot to mention that it doesnt need any mods to run, just patched ctp2, extract to scenario folder.

                Not much slic in there, nothing new at all, in fact its abit dodgy last time i tried it but nothing exe crashable.

                New things noticeable in it -

                -- china city style from civ 2 (looks better than you would expect but could look better)
                -- new watch tower graphic (taken from sudden strike omaha beach map)
                -- a few altered tiles to make it look abit more grim
                -- new farm and adv farm tile imps
                -- city styles relevant to area on map, ie british cities in india have a [i]kind of[i/] indian style, rather than european style (took me a while to figure out how to do that)

                thats about it.
                Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                CtP2 AE Wiki & Modding Reference
                One way to compile the CtP2 Source Code.

                Comment


                • #38
                  Does anyone know why i cant download anything from the ctpmodmakers.250free site?

                  Due to an inordinate amount of abuse, visitors to
                  this free account from your region or
                  country have been restricted.
                  Thats sounds a little vague.
                  Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                  CtP2 AE Wiki & Modding Reference
                  One way to compile the CtP2 Source Code.

                  Comment


                  • #39
                    Dunno, it works for me (he says, testing it...) I can download from the site itself, the ftp seems to have a new policy whereby you can only download if you've already uploaded something in the same session. This to prevent leeching or something.

                    upload/download ratio is 20 000 to 1, so to get your scenario out of the FTP client I'd have to upload 170GB of stuff. This is not good.

                    It seems to be ok if you make your own (local) html page pointing to the file you want, and do right-click -> save target as. Bizarre.
                    Concrete, Abstract, or Squoingy?
                    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                    Comment


                    • #40
                      Its working from the link above aswell now, odd.
                      Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                      CtP2 AE Wiki & Modding Reference
                      One way to compile the CtP2 Source Code.

                      Comment

                      Working...
                      X