Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: CommanderDJ on January 25, 2011, 09:12:09 am

Title: Making ships "flash"
Post by: CommanderDJ on January 25, 2011, 09:12:09 am
Hey guys,
I'm working on a little cutscene project, and wanted to get a ship to sort of appear and disappear repeatedly at irregular, less-than-a-second intervals. Is this possible via FRED?

Thanks.
Title: Re: Making ships "flash"
Post by: Shade on January 25, 2011, 09:28:01 am
The whole ship or simply the radar blip?
Title: Re: Making ships "flash"
Post by: Nohiki on January 25, 2011, 09:28:30 am
HAving the camera jump between locations where it is looking at the ship and where it isn't comes to mind
Title: Re: Making ships "flash"
Post by: CommanderDJ on January 25, 2011, 09:37:10 am
Shade: the whole ship.

Nohiki: That could potentially work, but skybox would be an issue, as it needs to be seamless, as it's sort of like a Transcend-esque sort of thing. The ship's flying along, and then it just starts to intermittently wink out of existence and come back very quickly, all the while flying its nice straight path.
Title: Re: Making ships "flash"
Post by: Nohiki on January 25, 2011, 09:44:42 am
The moving is no problem with get-object-x/y/z and math sexps, but skybox.... Maybe if you kinda "zoomed in" - Have a point the camera is looking at and then just have it approach it, leaving the ship behind itself. If that's done more than 24 times per second, it will be smooth :D But it just feels wrong.
Other solution that comes to mind is to have a transparent texture and swap notmal with transparent, if it can be done with sexps, or jsut have the whole texture as glowmap and turn it on/off, but that has potential to look very weird  :lol:
Title: Re: Making ships "flash"
Post by: Shade on January 25, 2011, 09:45:53 am
In that case, you could try using change ship class to turn the ship into some small invisible spec. Granted that would require you to have a small invisible spec model, but that's hardly the hardest modeling job ever. Alternatively, using texture replacement to change the ship's textures to a set that don't actually exist might also work, but then, it might also just crash the game.
Title: Re: Making ships "flash"
Post by: General Battuta on January 25, 2011, 09:46:22 am
Change-ship-class to something - yeah, what Shade said.
Title: Re: Making ships "flash"
Post by: pecenipicek on January 25, 2011, 10:19:11 am
In that case, you could try using change ship class to turn the ship into some small invisible spec. Granted that would require you to have a small invisible spec model, but that's hardly the hardest modeling job ever. Alternatively, using texture replacement to change the ship's textures to a set that don't actually exist might also work, but then, it might also just crash the game.
dont we have an invisible texture just for the... well invisibile parts?
Title: Re: Making ships "flash"
Post by: FreeSpaceFreak on January 26, 2011, 03:01:20 am
Hey guys,
I'm working on a little cutscene project, and wanted to get a ship to sort of appear and disappear repeatedly at irregular, less-than-a-second intervals. Is this possible via FRED?
Thanks.

Like was mentioned above, changing ship class should work. However, that will just be a SEXP list, which means you will have n-second intervals. Less-than-a-second intervals, I doubt that's possible with FRED today.
Title: Re: Making ships "flash"
Post by: ssmit132 on January 26, 2011, 03:16:43 am
Could you have a model of the ship that's the same, but textured with an EFF that has two frames - one with the texture visible, and one invisible - and then you use the FPS setting to set how many times it blinks per second? Of course, you'd need to do this with every texture the ship uses, and I'm not sure whether using EFFS for shine and (especially) normal maps works (you could dipsense with the ones that don't work).
Title: Re: Making ships "flash"
Post by: karajorma on January 26, 2011, 05:24:27 am
Like was mentioned above, changing ship class should work. However, that will just be a SEXP list, which means you will have n-second intervals. Less-than-a-second intervals, I doubt that's possible with FRED today.

Eh? The SEXP system is called once a frame. There is no reason you can't have something happen multiple times a second.
Title: Re: Making ships "flash"
Post by: Colonol Dekker on January 26, 2011, 05:29:52 am
If the ship is flyingto a target in a straight line. All you need to do is do maths with the speed and distance. Then use two
when-
distance
<
-ship
-target
Operators.
Assuming they update fast enough they shpuld allow less than a second operation.
Title: Re: Making ships "flash"
Post by: FreeSpaceFreak on January 26, 2011, 11:51:21 am
Eh? The SEXP system is called once a frame. There is no reason you can't have something happen multiple times a second.

Hmm, I was just thinking of has-time-elapsed and is-event-true-delay, which only take integer arguments. But yeah, Dekker's way would work.
Title: Re: Making ships "flash"
Post by: Goober5000 on January 27, 2011, 02:10:16 am
Dekker's way has been known and used (very, very rarely of course) for many years.  I used it extensively in DEM:Interlude as well.  But now it's even easier, since recent SCP builds have the mission-time-msecs sexp in them. :)
Title: Re: Making ships "flash"
Post by: MadProf on January 27, 2011, 11:33:01 am
Thought about this one a bit, had to do something at work other than fall asleep.
Two waypoints with the x values the negative of the other, i.e waypoint 1 at -10000, 0, 20000  waypoint 2 at 10000, 0, 20000
ship starts heading towards waypoint 1, when < distance reached, using the set-object-position and invert the ships x pos, clear goals and say to head towards wauypoint 2.  When < distance reached, switch the x position and goal back to 1.

Repeat.

If the path to the second waypoint is not in camera view the ship disappears when it's heading towards it.

With a couple of variables, and everytime can be implemented in using just two events.

Example in the attachment


[attachment deleted by ninja]