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.
Welcome to Spaceempires.net
Login or Register

Search
Modules
· Content
· Downloads
· Forums
· Game Info
· Image Gallery
· Links
· Shipyards
· Topics
· Staff

User Info
· Welcome, Anonymous
Membership:
· New: Astorre
· New Today: 0
· New Yesterday: 0
· Overall: 3155

People Online:
· Visitors: 127
· Members: 0
· Total: 127

  

Spaceempires.net :: Possible jump gate function :: View topic
Forum FAQ :: Search :: Memberlist :: Usergroups :: Profile :: Log in to check your private messages :: Log in


Possible jump gate function

 
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEV Modding Discussion
View previous topic :: View next topic  
Author Message
edge1218
Space Emperor


Joined: Mar 16, 2008
Location: Tennessee

PostPosted: Sun Apr 13, 2008 2:48 am    Post subject: Possible jump gate function Reply with quote

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
call Sys_Space_Object_Clear_Orders(ship_id)
call Sys_Space_Object_Clear_Fleet(ship_id)

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
exelsiar
Space Emperor


Joined: Jun 14, 2007
Location: Fleet, England, UK

PostPosted: Sun Apr 13, 2008 11:30 pm    Post subject: Reply with quote

yay for building a station on your homeworld then jumping it to a planet/WP that needs defending...

why is it that spacial anomaly event always moved my stations >_<


Grand Lord Exelsiar of the Azra-Dun Commonwealth, at your service


Back to top
SuicideJunkie
Leaky Guru


Joined: May 28, 2005
Location: Canada!

PostPosted: Mon Apr 14, 2008 2:46 am    Post subject: Reply with quote

Grab the latest scripting toolkit, and you can use the tag functions.

Name your ship something like:
SS Phong Dance [GateTo 5,2]

And at the end of turn, the scripts can identify it and trigger the teleport.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEV Modding Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
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: SpaceEmpires.net News RSS Feed - Syndicate forums: SpaceEmpires.net Forums RSS Feed
Page Generation: 0.16 Seconds