Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Geeting the x and Y of a location
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:23
  Old Post 20-10-2002 07:13
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Getting the x and Y of a location Support Apolyton buy from Amazon

How is it possible to get the x and y coordinates of a location and assign them to a variable? I have tried to use location.x and location.y (even location.location), but everytime I use these, CTP2 says "Location is not a structure".

I did a search trough the CTP2 directory and mods and there is not a single line of code that uses location.x or .y. The disasters mod gets the X and Y by using Random(tmpX) and then assigning tmpX to another variable -- pretty clever.

But if you want a city's x and y location you can't use city[0].location.x and city[0].location.y

How do you get these values?

Last edited by ahenobarb on 20-10-2002 at 09:23

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 20-10-2002 17:27
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Lose 30 kilos (of popups)

IIRC, you have to have the location variable first: either a builtin "location[0]" or a user defined "tmpLoc" and then use "location[0].x" or "tmploc.x" So try "location[0]=city[0].location;"

BTW, at the time of this post, 6 people have previously viewed this thread. Are there really that many lurkers out there interested in such obscure subjects? If so, more posters are always welcome.

ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:23
  Old Post 20-10-2002 21:04
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Avatar Enlargement: We've got the solution

Oh, I forgot the '[0]'. Sometimes you work a problem so much you lose all perspective and someone else has to come along and tell you what you're overlooking.

Thanks, Peter.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:23.
Apolyton Time is 00:23.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0290 seconds (88.50% PHP - 11.50% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net