Author Topic: Finding Locations  (Read 1539 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Finding Locations
« on: January 25, 2010, 04:08:55 PM »
I get the feeling this has been asked and answered before, but my searches can't find anything...

Anyways, I want to use a PlayerBuildingEnum to find all of a player's buildings and then spawn a permavortex on them because I'm an evil, evil person. :evil laugh:

It's the "find the location" part I'm having trouble with... any suggestions?
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Finding Locations
« Reply #1 on: January 25, 2010, 06:07:19 PM »
unit blah;
while (PlayerBlightEnum.getNext blah blah blah)
{
location LOCATIONFOOL = blah.location;
int XFOOL = blah.location.x;
int YFOOL = blah.location.y;
}
« Last Edit: January 25, 2010, 06:07:57 PM by Arklon »

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Finding Locations
« Reply #2 on: January 25, 2010, 07:42:09 PM »
Thanks!  I'm sure nobody else will be too happy about this though!
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Finding Locations
« Reply #3 on: January 26, 2010, 12:56:26 AM »
I'm all for torturing people, especially when they like to rush in games, lol
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
Finding Locations
« Reply #4 on: January 26, 2010, 04:30:51 AM »
You mean there actually is an easy way to return the coordinates of an existing object? (unit or building at least... would be nice if it included mining beacons and the like)

:CK9's:

I never came across it...
"Nothing from nowhere, I'm no one at all"