Random Stargates
-
- Fleet Officer
- Posts: 1036
- Joined: Wed Feb 03, 2010 4:28 am
- Location: Researching how to make St. Kats star go supernova.
- Contact:
I was wondering if there is a way to make a stargate go to a random location, so you can go in once and go to say St. Kats, and again and go to Point Juno. (I know you can set the topology so it sends it sets a permanent but random system, I don't want it to be permanent) Is this at all possible? It would work great in a mod I'm working on.
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
-
- Fleet Officer
- Posts: 1036
- Joined: Wed Feb 03, 2010 4:28 am
- Location: Researching how to make St. Kats star go supernova.
- Contact:
Maybe that could work, like create each stargate and deactivate all but one, create a recurring time event where it switches on one of the gates, and deactivates the previously active one. Thanks for the help!
Now I can really get that pesky player lost

Now I can really get that pesky player lost

Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
-
- Fleet Officer
- Posts: 1036
- Joined: Wed Feb 03, 2010 4:28 am
- Location: Researching how to make St. Kats star go supernova.
- Contact:
It would make my life a lot easier if there is a <reload> function or similar. Then I could put it into a topology with a stargate with a random location, and viola: a completely lost player.
Also, I tried this:
I also have inactive=true in the station data.
Is something there not right? The gate just sits there inactive.
Also, I tried this:
Code: Select all
<OnCreate>
(block nil
(if (objGetData gSource "Active")
"Default"
"Activate"
)
(sysAddObjTimerEvent 10 gSource "OnStart")
)
</OnCreate>
<OnStart>
(sysAddObjRecurringTimerEvent 40 gSource "OnActive")
</OnStart>
<OnActive>
(block nil
(sysAddObjTimerEvent 10 gSource "OnStop")
(objSetData gSource "Active" True)
(staSetActive gSource)
)
</OnActive>
<OnStop>
(objSetData gSource "Default" True)
(staSetInactive gSource)
</OnStop>
Is something there not right? The gate just sits there inactive.
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
I tried something similar and found that when the stargates (possibly all objects) are inactive, the events will not trigger.
As a workaround, in the onCreate event of the gate, spawn an invisible ship to act as the gatekeeper and place all your scripts in there.
Then it's a simple matter of spawning multiple gates, storing them as a list on the gatekeeper and you can easily move them within the system and activate/deactivate at will.
objSuspend and objResume are the funcs you're looking for.
Also, you'll have to play around and maybe create a new gate type to prevent them from appearing in the map as "Gate to Foo" which would ruin the whole surprise.
As a workaround, in the onCreate event of the gate, spawn an invisible ship to act as the gatekeeper and place all your scripts in there.
Then it's a simple matter of spawning multiple gates, storing them as a list on the gatekeeper and you can easily move them within the system and activate/deactivate at will.
objSuspend and objResume are the funcs you're looking for.
Also, you'll have to play around and maybe create a new gate type to prevent them from appearing in the map as "Gate to Foo" which would ruin the whole surprise.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!