Events and Starton Eridani

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

I have been trying to create an oncreate for Starton Eridani in an extension but it doesn't seem to work. I have changed other things about the station and those work but that one doesn't seem to work. Anyone know why?

Just tested onDestroy too and that isn't working for my extension too.

Code: Select all

		<Events>
			<OnDestroy>
				(intCommonwealthOnDestroy)
			</OnDestroy>
			
			<OnCreate>
				(plyCredit gPlayer 10000)
			</OnCreate>
		</Events>
I believe this is a bug.
Crying is not a proper retort!
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

It's sort of a bug: the gPlayer variable is not initialized when the OnCreate event gets called.

If you just want to give yourself more credits, try the "startingCredits" attribute in the <PlayerSettings> element (on a ShipClass):

Code: Select all

<ShipClass ...

<PlayerSettings
   ...
   startingCredits="10000"
   >
   ...
</PlayerSettings>
...
</ShipClass>
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

well the starting credits thing was more of an easy test. (I wanted to make a starting dock screen)
When is the gPlayer initialized?

at least I found what was wrong with onDestroy I didn't know that corp and commonwealth where seperated.
Crying is not a proper retort!
Post Reply