Determining the link-in point?

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Determining the link-in point?

Postby Robert The Rebuilder » Thu Aug 07, 2008 9:33 am

I need to determine the spawn point used by a player in Python once the age loads. This would apply to Ahra Pahts, which currently assumes that someone links in at the default. However, given that you have the ability to configure ULM to link in at an arbitrary point (as di gama had discovered), this means that you can link in to a portion of the city where no shells have been paged in.

So, what's the Plasma Python call to determine the link-in point object?
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Determining the link-in point?

Postby D'Lanor » Thu Aug 07, 2008 9:56 am

There are several methods but here is one that would work for the age owner as well as visitors to the age.

Code: Select all
        linkmgr = ptNetLinkingMgr()
        link = linkmgr.getCurrAgeLink()
        spawnPoint = link.getSpawnPoint()
        spTitle = spawnPoint.getTitle()
        spName = spawnPoint.getName()
        if (spName == 'LinkInPointDefault'):
            print 'you linked in at the default location'
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Determining the link-in point?

Postby Robert The Rebuilder » Fri Aug 08, 2008 12:50 pm

Thanks, D'Lanor - I'll give that a try when I get home.

[EDIT 8/8] Yes! That worked! I'll make sure that goes into v1, to support arbitrary link-in points. Thanks again!
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron