Author Topic: ship-invisible breaks collisions  (Read 4344 times)

0 Members and 1 Guest are viewing this topic.

Offline Ferret

  • 28
  • A very hungry Fiona.
ship-invisible breaks collisions
I really need to be able to make ships suddenly be untargetable in missions. You can do this with ship-invisible right?
But then I need to make it come back again. So later on I do ship-visible.

So far so good, but now I cannot collide with the ship anymore. :eek2:

Is is there anyway to fix this? Or alternatively, is there another way to stop ships being targetted by the player then revert it again?

[edit]

Also, is there anyway to revert what's done by using ship-vanish?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: ship-invisible breaks collisions
Ship-vanish is a rather dangerous SEXP to use carelessly as certain things ignore it. If you want to fake it simply use the set-x(y,z)-position SEXPs to move the ship 200,000m away and stealth it if you can.

You may be able to ship-create a ship that you vanished earlier but you could possibly get some very strange bugs out of that so experiment first before relying on it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Blue Lion

  • Star Shatterer
  • 210
Re: ship-invisible breaks collisions
Can't you turn off/on the warp effects?

Have it jump then enter?

 

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
Ship-vanish is a rather dangerous SEXP to use carelessly as certain things ignore it. If you want to fake it simply use the set-x(y,z)-position SEXPs to move the ship 200,000m away and stealth it if you can.

You may be able to ship-create a ship that you vanished earlier but you could possibly get some very strange bugs out of that so experiment first before relying on it.
I would already be doing this if my plan wasn't to move a large amount of ships. (We're talking everyone but the player.)

Also warping might work, but as I said, I'm moving everything, so this would have to include ships not in system yet as the effect I'm having is supposed to be slightly random.

[edit]

Okay I'll explain what I'm trying to do step by step, even though I really didn't want to.

Anyway, I'm trying to make it look like tho player is being transported to a nebula for a short few seconds and back again, quickly and painlessly.
So, turning on the nebula is no problem at all. The problem is making the rest of the ships disappear. I tried to rectify this moving the player 70 odd km away, while saving the coordinates and them moving them back after.
However, they still appear on sensors and are still targeted by the player if you have them targeted when you teleport.

So I tried ship-invisible, they're still targeted by the player, but are now gone from the radar. I realised that I could kinda stop this by starting an EMP storm, which knocks off what you have targetted.

Now, although not without flaws, this is the best I colud come up with, until I realised I was now flying into ships. It took me a while to narrow it down to the ship-invisible, ship-visible combination.

So if anyone has any fix or suggestions it would be appreciated. My mission revolves around this effect so it's pretty critical. Otherwise it's back to the story drawing board
« Last Edit: March 14, 2006, 06:26:24 pm by Ferret »

 

Offline Blue Lion

  • Star Shatterer
  • 210
Re: ship-invisible breaks collisions
I guess it depends if you have patience is all.

You can make them invisible, or not even there. I suppose we'd need to know more about the missions, which would make no sense.

 

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
Edited my post after you replied. :P

 

Offline Blue Lion

  • Star Shatterer
  • 210
Re: ship-invisible breaks collisions
I still think having the ships jump solves it the best. If it's only for a few seconds it shouldn't be a big problem having all the ships jump back in pretty much right where they left.

Only hard part is you have to choreograph it pretty well.

  

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
If I make ships warp out and then in again, will they warp in at thier warp out point or the default position when the mission starts? Because that just wont do at all.

It's not not very viable, I'ld still be having to check whether a ship is in system or not when the player "teleports". Plus that's a hell of a lot of event handling.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: ship-invisible breaks collisions
Ummm. Unless I've been missing something for years there's no way to have a ship jump out and then jump back in again. You can fake the effect using a ship with a virtually identical name but you can't actually have the same ship jump in that jumped out earlier in a mission.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Mefustae

  • 210
  • Chevron locked...
Re: ship-invisible breaks collisions
How precise would my timing have to be if I wanted to have, say, an Orion jump out, and another Orion with the same name [the same Orion story-wise] jumping in at the exact same time a few thousand kilometres away. So that - for instance - when half of the orion has entered the subspace window, the front half of the second orion would have exited subspace some distance away, immitating an instantaneous jump?

 

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
You'll have to time it.

Why is it that of all the added SEXP's there hasn't been one that makes a ship disappear in it's entirety but is still there so can be recalled back at a moments notice?
I personally can see a bazillion uses for this so I'm not sure why it hasn't happened.

How hard would it be to code it myself? I havn't looked at the SEXP stuff at length.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: ship-invisible breaks collisions
Why is it that of all the added SEXP's there hasn't been one that makes a ship disappear in it's entirety but is still there so can be recalled back at a moments notice?

I personally can see a bazillion uses for this so I'm not sure why it hasn't happened.

Probably because we've been doing tons of other stuff and there's a perfectly fine way of doing it already?

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: ship-invisible breaks collisions
I suggest setting all the friendly ships to a different team (e.g. neutral), and then making ALL ships (including the player) stealth usings the set-ship-stealthy sexp.  That would make them untargetable for the player, and also for each other, so you can be more sure that no important ships will be destroyed while the player is "away."
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
I suggest setting all the friendly ships to a different team (e.g. neutral), and then making ALL ships (including the player) stealth usings the set-ship-stealthy sexp.  That would make them untargetable for the player, and also for each other, so you can be more sure that no important ships will be destroyed while the player is "away."
THAT.. might just work, thank you! *Tests it*

 

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
Right no it didn't, I've been away for the weekend and so have been trying to do this since I came back, I had a slight feeling it was something totally different that was breaking collisions.
And well holy crap it was.

The set-ship-position SEXP when I use it on Alpha 1 is letting the player fly into anything. :shaking:

Can anyone else test this SEXP to tell me if they're getting the same dealy? I've tried as many builds I can find that will even use the SEXPs and I'm still flying into stuff.. *cries*

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Re: ship-invisible breaks collisions
Does a shorter set-ship-position hop (say, 5km) still result in this bug?  70km is a fairly long way, and may impact things a little strangely if my hunch is right.  How big is the mission area these days?
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Ferret

  • 28
  • A very hungry Fiona.
Re: ship-invisible breaks collisions
Yes I tried it by sticking the warp about 50 metres away and got the same result.

I did have to reduce the hop to about 50 km anyway, I had it a bit higher and it was messing with the HUD.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: ship-invisible breaks collisions
Hmm.  If you use the set-ship-position sexp on a non-player ship, does it also stop colliding with objects, or is it only the player ship that suffers from this bug?

Either way, you should post a bug report in Mantis (go to the SCP forum for the link).  But if non-player ships retain their collision data, you can work around this bug by moving all of them instead of moving the player.  You would just need to use the every-of sexp (you can look up how to use it in the FS2 wiki).
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: ship-invisible breaks collisions
:D I like that idea. Wouldn't work in missions with asteroid fields though cause you can't move them.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]