enterPlayerWormhole not working in interstellar space
Moderators: winston, another_commander, Getafix
Re: enterPlayerWormhole not working in interstellar space
This bug has now hopefully been fixed (r4421). I tested with several ships following the player through a series of consecutive misjumps.
Along the way a few smaller wormhole-related fixes were made, the major one being that if a ship with escorts follows the player, the escorts would previously not have followed.
The biggest scripting-related change is that the AI message "WITCHSPACE OK" is now emitted for -every- ship leaving the system via a wormhole, not just for ships which create a wormhole.
I'd appreciate you giving these changes a very thorough testing (since you're working on a related script) as the code changes were non-trivial.
Along the way a few smaller wormhole-related fixes were made, the major one being that if a ship with escorts follows the player, the escorts would previously not have followed.
The biggest scripting-related change is that the AI message "WITCHSPACE OK" is now emitted for -every- ship leaving the system via a wormhole, not just for ships which create a wormhole.
I'd appreciate you giving these changes a very thorough testing (since you're working on a related script) as the code changes were non-trivial.
The glass is twice as big as it needs to be.
Re: enterPlayerWormhole not working in interstellar space
Good work mateyMicha wrote:the code changes were non-trivial.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
Re: enterPlayerWormhole not working in interstellar space
Well, no, I should have written it properly to start off with.
We only want trivial changes at this stage of the game so that we don't inadvertently break more stuff than we fix.
I only mentioned it since this set of changes includes more than just a fix for this particular bug, and hence a thorough re-testing is required.
We only want trivial changes at this stage of the game so that we don't inadvertently break more stuff than we fix.
I only mentioned it since this set of changes includes more than just a fix for this particular bug, and hence a thorough re-testing is required.
The glass is twice as big as it needs to be.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: enterPlayerWormhole not working in interstellar space
Thanks, Micha!
I will start testing as soon as the latest nightly will include rev 4421.
I will start testing as soon as the latest nightly will include rev 4421.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: enterPlayerWormhole not working in interstellar space
Have just downloaded the latest nightly (4424) and started testing.
The stranded trader correctly followed me through my wormhole and emerged only seconds after myself on the first try. However, I immediately noted one thing: when emerging the ship script
The handler also doesn't trigger in 1.75.
The stranded trader correctly followed me through my wormhole and emerged only seconds after myself on the first try. However, I immediately noted one thing: when emerging the ship script
shipSpawned
handler doesn't trigger. Is this by design, and is there a reason for it? To me it appears more like a bug.The handler also doesn't trigger in 1.75.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: enterPlayerWormhole not working in interstellar space
It is correct.Commander McLane wrote:However, I immediately noted one thing: when emerging the ship scriptshipSpawned
handler doesn't trigger. Is this by design, and is there a reason for it? To me it appears more like a bug.
The handler also doesn't trigger in 1.75.
shipSpawned
triggers only for creation of a ship. Or better, not on creation, but on the first update. Almost the same, but on the first update all ships that spawned after the ship (like escorts, group members or other oxp ships) are already present.For detection of going trough a wormhole, we still have
shipExitedWormhole
. For 1.74 it did fire for npc. (I used it in random hits for logging purposes) Not tested after the recent changes but I assume it should still work.UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: enterPlayerWormhole not working in interstellar space
That will do. Thanks!Eric Walch wrote:For detection of going trough a wormhole, we still haveshipExitedWormhole
.
Re: enterPlayerWormhole not working in interstellar space
It works in 1.75.0 beta (I'm playing with it for the butterflies callback version). Not sure about current trunk.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: enterPlayerWormhole not working in interstellar space
It also works in trunk.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: enterPlayerWormhole not working in interstellar space
Caveat: when you load a game containing saved wormholes, the ships in the wormhole will be created when the game is loaded, and will get a
For EMMSTRAN I’d like to do away with the current system of live ships being “suspended” in wormholes, and instead store them as property lists in the same way we do after loading a game with saved wormholes. It’s too late to do this for MNSR. (The inconsistency arose because of the order features were added: first ships being saved in wormholes, then JavaScript and event-based scripts, then saving of wormholes when the wormhole scanner was added.)
shipSpawned()
event on the first frame after they exit the wormhole. Looking at the code, I believe this will happen after shipExitedWormhole()
.For EMMSTRAN I’d like to do away with the current system of live ships being “suspended” in wormholes, and instead store them as property lists in the same way we do after loading a game with saved wormholes. It’s too late to do this for MNSR. (The inconsistency arose because of the order features were added: first ships being saved in wormholes, then JavaScript and event-based scripts, then saving of wormholes when the wormhole scanner was added.)
E-mail: [email protected]
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: enterPlayerWormhole not working in interstellar space
Thank you for the information. I think the caveat doesn't apply for my special case, because the ships following the player will exit the wormhole shortly after him no matter what, leaving no possibility to save and reload in-between.
In the case of an NPC jumping out and the player following, the NPC will have left the wormhole before the player. But of course the player could not enter the NPC's wormhole in the first place, leaving the NPC in digital nirvana and maybe subsequently triggering the wrong event. I'll look into that.
In the case of an NPC jumping out and the player following, the NPC will have left the wormhole before the player. But of course the player could not enter the NPC's wormhole in the first place, leaving the NPC in digital nirvana and maybe subsequently triggering the wrong event. I'll look into that.