Page 1 of 1

Texture switching through player actions.

Posted: Fri Jan 14, 2011 2:54 pm
by gogz69
Would it be possible to switch textures for the player action of launching missiles?

I've roughly drawn up a twin missle bay to demonstrate:


1.Condition state: green - no target set.

Image



2.Condition state: yellow/red - missile armed/locked.

Image



3.Condition state: 1 missile launched.

Image



4.Conditon state: all missiles launched.

Image



Of course, there are many combinations that could be used.

Re: Texture switching through player actions.

Posted: Fri Jan 14, 2011 5:17 pm
by JensAyton

Re: Texture switching through player actions.

Posted: Fri Jan 14, 2011 7:36 pm
by Thargoid
Ahruman wrote:
Coupled with this

Re: Texture switching through player actions.

Posted: Fri Jan 14, 2011 8:10 pm
by Smivs
Wow, this opens up some possibilities.

Runs off muttering "shipset v4.0....no!....I've done enough...Aaaaaargh!

Re: Texture switching through player actions.

Posted: Fri Jan 14, 2011 8:39 pm
by Thargoid
And I haven't even mentioned coupling the worldscript event above with removal of sub-entities and positioning of the launched missile to match the sub-ent missile just removed... ;)

Re: Texture switching through player actions.

Posted: Fri Jan 14, 2011 9:52 pm
by Eric Walch
Thargoid wrote:
And I haven't even mentioned coupling the worldscript event above with removal of sub-entities . ;)
And not to forget the restoration of subentities:

Code: Select all

Revision: 3661
Date: donderdag 8 juli 2010 09:23:01 Nederland-tijd
Author: kaks

A bunch of frangible ships changes, might be revised soon:
- save games now remember whether the player ship's subentities are destroyed or not, and show them on the integrated load screen.
- maintenance overhaul now repairs subentities too. An extra fee is added to the price, proportional to the number of destroyed subentities.
- new js function: ship.restoreSubEntities() - repairs all subentities, returns false if no subentities were restored.
- new js property: ship.subEntityCapacity - the number of undamaged subentities the ship comes with.
Meaning that its possible to add them back after loading new missiles.

Re: Texture switching through player actions.

Posted: Sat Jan 15, 2011 8:28 am
by Thargoid
That's only in trunk, not 1.74.2, hence I deliberately didn't mention it. But yes that is another option too, or will be soon for the masses.

Re: Texture switching through player actions.

Posted: Sun Jan 16, 2011 4:50 pm
by Killer Wolf
Although this seems like a good and exciting feature, for something like damage (laser scorchmarks/holes etc) and those missiles, would it not be better (if possible) to do this via decals? i'm thinking that the given missile example would need 4 skins, and potentially 4x3 maps if you're using the Griff-type shadery stuff. This is going to mean a lot more memory usage, and bigger OXPS, isn't it...?

Re: Texture switching through player actions.

Posted: Sun Jan 16, 2011 6:00 pm
by JensAyton
Killer Wolf wrote:
Although this seems like a good and exciting feature, for something like damage (laser scorchmarks/holes etc) and those missiles, would it not be better (if possible) to do this via decals?
Yes, except it’s impossible. At the moment, you can’t communicate arbitrary information to shaders except by changing the materials dictionary.