Author |
Spawning Structures on Planets |
Riley! Chief Marshal
Joined: May 29, 2002 Posts: 257
| Posted: 2003-02-11 08:31  
Okay, there used to be a thread on this subject, but I can't find it.
I'm making a training map that consist of the four major roles in the game: Capping, Combat, Engineering a Bombing. I need the code to spawn planetary structures for the bombing course... and help will be appreciated
thanks
_________________
|
T|t@n {C?} Cadet
Joined: August 28, 2002 Posts: 123
| Posted: 2003-02-11 11:16  
i think there was something like this already... they said there is no code and you should make a map persistant and make a backup from it to use it more often...
_________________
|
Stealthvirus Cadet
Joined: July 01, 2002 Posts: 170 From: England, UK
| Posted: 2003-02-11 12:41  
It IS in fact possible to spawn structures on planets.
It's been a while since I last tried.. but to get you started- copy this somewhere into your script and remotecall it.
variable1=getKey( "Nameofwhateverplanet" )
local x,y,z = getHexPosition(variable1,10)
spawn=createSpawn("building",x,y,z)
b1=spawnNoun( "Structures\Kluth\Colony Hub.PRT",spawn,"Nameofbuilding",variable1 )
This was copied directly from my scripted map: "Seizewell" with names modified. It should work... but position of buildings on planets is somewhat random. Perhaps you can work out a way to make it work?
You'd better ask Chromix about most of this. he knows it all- but will probably just tell you to read up on the Lua language and learn how to be a full-time professional programmer before attempting this .
_________________
|
Tael 2nd Rear Admiral Palestar
Joined: July 03, 2002 Posts: 3697 From: San Francisco Bay Area
| Posted: 2003-02-11 13:05  
Because of several changes and proposed changes the old script detailing it was moved to the private forums.
_________________
|
Riley! Chief Marshal
Joined: May 29, 2002 Posts: 257
| Posted: 2003-02-11 15:26  
Thanks
_________________
|
Pope Fleet Admiral
Joined: June 11, 2002 Posts: 2449 From: World of tomorrow
| Posted: 2003-02-11 15:38  
yes, you can spawn structures..
no, you cannot control what hex on the planet the structure will spawn on. this also results in hex positions that are not part of the planet, and thus get ignored (and could possibly break things).
im suspecting an unintialized variable in the implementation of the lua->c api.
thats the last result of our attempts.
no further information is given by the staff since.
in order for defense bases to work, you have to spawn and bind the weapons to it. (2*pulse beam/4*cl300, 2*psi/it missile)
if you want any help with it, feel free to contact me. im a bit handicapped insofar as i cant run server side scripts on my machine for some reason, but probably can provide some valuable input nonetheless.
_________________
|