Show planets names at entry

Freeform discussion about anything related to modding Transcendence.
User avatar
Mutos
Militia Lieutenant
Militia Lieutenant
Posts: 218
Joined: Thu Aug 14, 2008 3:31 am
Location: Near Paris, France
Contact:

Hi Sponge, hi Periculi,


The planetmarker thing is what I'll do in the end.

There are too much downsides of changing scale, so many things depend on that...

I'll also make it dockable, as in Star Trek's standard orbit. You just stay in a parking orbit and, if there is a settlement, you are in contact with it.

EDIT #1 : first thing is, I wouldn't get the Stargates to show. I use the following code in the <System> tag :

Code: Select all

<Events>
	<OnCreate>
		(enum (sysFindObject gSource "G") theObj
			(objSetKnown theObj)
		)
  </OnCreate>
</Events>
I keep getting a "System OnCreate: No binding for symbol: theObj ### (objSetKnown theObj) ###" error. It would seem that the code is evaluated, but the sysFindObject returns no object. So when is the OnCreate event executed ? Are stargates already created at that time ? May it have something to do with my using the ATA and the ATA creating stargates after the system's OnCreate event is evaluated ?

EDIT #2 : second problem is with my new Parking Orbit object, but I thing I'll first settle the Stargates problem, then go to the next...

EDIT #3 : found the problem with stargates. In fact I placed the following code in my base system :

Code: Select all

<OnGlobalSystemCreated>
	(block nil
		(sysPlaceStargates)
		(enum (sysFindObject gSource "G") theObj
			(objSetKnown theObj)
		)
	)
</OnGlobalSystemCreated>
I have yet to test it in another system with multiple gates. However, when exactly are the <OnCreate> and <OnGlobalSystemCreate> evaluated ?

EDIT #4 : the answer for the above question lies in the Transcendence Mods & Extension page ! Indeed, the <OnGlobalSystemCreate> evaluates just after <OnCreate>. So my <OnCreate> script was not able to find the gates because they were not yet there !

EDIT #5 : sorry for all the edits, but things are going well. The "Parking Orbit" object now looks that way :

Code: Select all

<!-- Parking Orbit -->
<StationType UNID="&stParkingOrbit;"
	name=				"(parking orbit)"
	backgroundObject=	"true"
	sovereign=			"&svIndependent;"
	immutable=			"true"
	attributes=			"hk2250,knownOnStartup"
	>
	<ImageVariants>
		<Image			imageID="&rsOrbit;" imageX="0" imageY="0"  imageWidth="1" imageHeight="1" />
	</ImageVariants>
	<Events>
		<OnCreate>
			(objSetKnown gSource)
		</OnCreate>
	</Events>
</StationType>
I added some attributes that for now I don't use. The "hk2250" will be used to identify Hoshikaze-specific things. The "knownOnStartup" was for telling a global script to set the object to known. For now I made no use of that possibility. But it could be interesting if I would want to make any regular station known on system startup without overriding or creating a StationType.
@+

Benoît 'Mutos' ROBIN
Hoshikaze 2250 Project
Post Reply