Members | Sign In
All Forums > Mission Scripting
avatar

Destroying Nebulae, then recreating them

posted Sep 05, 2012 06:16:08 by tieguyny
I'm working on a mission that requires you to move between "maps", basically by destroying everything on the map and creating all new objects when you move to the edge of the map, and reversing the process when you move back. I'm using the same event to create the map when you start the mission as to recreate it, but when it is recreated everything comes back EXCEPT the nebulae. I'm not sure what's causing this, was wondering if anyone here had any idea. Also, if there's a post that's already dealt with this, feel free to direct me to it, I looked but couldn't find anything.

Thanks for you help. Here's hoping I can't get this sorted and have an interesting mission to share.
page   1
10 replies
avatar
DwayneShaffer said Sep 05, 2012 07:48:20
TreChipman said Aug 07, 2012
I have a multi-sector preliminary build here.It needs some fleshing out, and needs to be 1.652 compliant, but it's a start.


Dwayne Shaffer C.O.
Vidar GSR 3701
C.D.F. 7th Fleet
http://vidar-gsr-3701.webs.com/
avatar
DwayneShaffer said Sep 05, 2012 07:53:20
I am currently working on a 26 sector (Systems) for the BSG Mod. The coding is good. The system to system jumping works great. if you download this mission it will give you some idea on what you need to make the system to system jump work.
Dwayne Shaffer C.O.
Vidar GSR 3701
C.D.F. 7th Fleet
http://vidar-gsr-3701.webs.com/
avatar
tieguyny said Sep 05, 2012 23:53:22
Thanks for the reply, but clicking that link above only takes me to the main page of the forum. Is there some trick to downloading your mission?
avatar
DwayneShaffer said Sep 06, 2012 04:08:27
Here is the page the download link is on the mission is Tre Chipman. It is located ath the bottom of the page.


http://www.artemis.eochu.com/?page_id=28%23/20110719/mission-script-ref-150-735454/page2/#/20110719/mission-script-ref-150-735454/page2/
Dwayne Shaffer C.O.
Vidar GSR 3701
C.D.F. 7th Fleet
http://vidar-gsr-3701.webs.com/
avatar
TreChipman said Sep 06, 2012 04:20:52
The forum software doesn't always seem to link internally correctly. Try downloading it directly from here. Word of warning: it's still a very early build and has a few bugs, but if you look at the LRS in the initial system, then jump to another system (the singularity-looking things are jump points), do an LRS, then jump back to Sol, you'll see that the original Nebulas were removed on the first jump, and replaced on the second.

Asteroids, Mines, and Nebulas get destroyed differently from named objects-- on exiting the system, I do this:

<destroy_near type ="nebulas" centerX="50000" centerY="0" centerZ="50000" radius ="75000"/>
<destroy_near type ="asteroids" centerX="50000" centerY="0" centerZ="50000" radius ="75000"/>
<destroy_near type ="mines" centerX="50000" centerY="0" centerZ="50000" radius ="75000"/>


This builds a sphere centered in the middle of the sector and destroys all the unnamed items, and then on re-entering the system, you create them again as usual. Note that I haven't factored in whales or space monsters yet, but it's a start.
I'm not a mad scientist. I'm an angry one. You'd be wise to fear the latter.

Visit Artemis Command!
avatar
GregKurlinski said Sep 06, 2012 04:52:06
I used simular code in a mission of mine. works great.
avatar
tieguyny said Sep 06, 2012 23:50:13
Thanks for you help everyone. My initial approach was the same as suggested above, but it wasn't working. I've solved the problem, and I did it by building a timer into my destroy events that has to finish in order for the create events to start. I only set it to 1 second, but this seems to be a sufficient delay so my destroy commands aren't overlapping my create commands, which I think was the problem.

Hope to share the results with you soon.
avatar
AaronMacke said Sep 06, 2012 23:56:17
One thing I ran into with doing this, that sounds like it could be a part of tieguyny issue...

I had to space the events out for destroying old nebula and creating new nebula by a 1 second timer. It seemed like if you let both trigger at the same time, the destroying destroys both your old and new nebula.
avatar
tieguyny said Sep 07, 2012 00:13:43
Wow AaronMacke, thanks for the reply! I guess I was posting mine at the exact time you were posting yours! I guess we've got a confirmed issue and a verified workaround.

Thanks again.
avatar
AaronMacke said Sep 07, 2012 14:27:13
Great minds post alike, I guess... :)
Login below to reply: