Affecting object transparency?
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Affecting object transparency?
Would it be possible to add an action that can change an object's transparency value?
For example, it could be used in a spell that allows illusion walls to temporarily be made partially see-through....
For example, it could be used in a spell that allows illusion walls to temporarily be made partially see-through....
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
It wouldn't matter -- the action would be used to target say, all illusion walls, or one specific monster, or all worm rounds, or whatever -- if semi-transparent objects end up over others, so be it -- RTC draws everything from the back to the front anyway, so it would be handled automatically.
Presumably.
Presumably.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Re: Actions to affect object transparency?
In summary, everything suggested here can already be done!
What you can do though is SWAP a specific item with a given object type into another one with a different object type (the first object type having opaque bitmaps, the second having transparent). That would give you the effect you want.
On purely semantic terms - No - an object is immutable. Remember the difference between "object" and "item" - an object is a theoretical concept, an abstract form that can't be altered. An item is a specific instance of something that can be changed.Gambit37 wrote:Would it be possible to add an action that can change an object's transparency value?
What you can do though is SWAP a specific item with a given object type into another one with a different object type (the first object type having opaque bitmaps, the second having transparent). That would give you the effect you want.
Just have the wall on the same tile as a WALLSET_ALT and swap the WALLSET_ALT type on the casting of the spell between a wallset with opaque bitmaps and one with transparent ones...that way only the tiles you want will change - nothing to do with the properties of the fake wall per se.Gambit37 wrote:For example, it could be used in a spell that allows illusion walls to temporarily be made partially see-through.... ;)
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Actions to affect object transparency?
Does it really have to be that complicated? Is it really not possible to have a general action to do this arbitrarily to any item?
It's exactly this unnecessary bloating of duplicated resources that I'm trying to avoid. You have a transparency flag in the engine already to render things 50% opaque -- why can't we simply invoke that using an action?George Gilbert wrote:What you can do though is SWAP a specific item with a given object type into another one with a different object type (the first object type having opaque bitmaps, the second having transparent). That would give you the effect you want.,
This is a nice solution but it again means duplicated bitmaps -- unless RTC is clever enough not to import duplicates when the difference is only the transparency flag?George Gilbert wrote:Just have the wall on the same tile as a WALLSET_ALT and swap the WALLSET_ALT type on the casting of the spell between a wallset with opaque bitmaps and one with transparent ones...that way only the tiles you want will change - nothing to do with the properties of the fake wall per se.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Re: Actions to affect object transparency?
No, for all sorts of reasons.Gambit37 wrote:Does it really have to be that complicated? Is it really not possible to have a general action to do this arbitrarily to any item?
Firstly, because the bitmaps are a separate resource from objects. This means that multiple objects can use the same bitmap (e.g. the clothing bitmaps in DM). If you toggled the transparancy of one, then all the others would change too.
Secondly, because the objects are a separate resource from items. So if you had several items all of the same object type toggling one item would change all the others too.
Thirdly, because the all the images are cached as the game is being played. Changing the properties of an individual bitmap mid-way through would cause all sorts of performance problems.
Fourthly (and this one is specific to your example), the fake wall object doesn't have any bitmaps associated with it, so there's nothing to toggle.
I'm sure there are probably others, but that'll do for now