This site is in archival mode. A replacement is being developed. In the meantime, please use the PBW2 Forums for community discussions. The replacement software for this site will use a unified account system with PBW2, and any newly created threads will carry over.
Posted: Sun Apr 13, 2008 2:48 am Post subject: Possible jump gate function
Poking around in the Event file I remembered being pissed when one of my bases ended up on the opposite side of the galaxy through a "spatial anomaly". So I went looking for the code and found the "Event Ship Moved" script. Here is the code that executed that move:
if (ship_id > 0) then
set sys_loc := Sys_Get_Space_Object_System_Location(ship_id)
set sect_loc := Sys_Get_Space_Object_Sector_Location(ship_id)
set ship_owner := Sys_Get_Space_Object_Owner(ship_id)
set ship_name := Sys_Get_Space_Object_Name(ship_id)
// Change the orders
set target_sys_loc := Sys_Get_Random_Long(1, Sys_Get_Number_Of_Solar_Systems())
set target_sect_loc := Sys_Get_Random_Empty_Sector(target_sys_loc)
if (target_sys_loc > 0) and (target_sect_loc > 0) then
call Sys_Set_Space_Object_Position(ship_id, target_sys_loc, target_sect_loc)
Tinker with this and there should be no reason why space objects at a specified sect_loc cannot be "jumped" to a target system. Operate it with the right loop and you could cycle through however many objects were located at sector umpty squat.
Would be an even neater trick if you put a fleet on the spot and blasted it across five systems... This calls for some experimenting when the time is available.
Then after all...maybe the gin and tonics are fogging my brain... Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All logos and trademarks used on this site, all comments and stories posted for reading, all files hosted for download, and all art work hosted for viewing are property of their respective owners; all the rest copyright 2003-2010 Nolan Kelly.
Syndicate news: - Syndicate forums:
Page Generation: 0.15 Seconds