[Duplicate] ACS: APROP_BrightnessLevel and GetCurrentSector

Moderator: GZDoom Developers

ACS: APROP_BrightnessLevel and GetCurrentSector

Postby Skippy » Thu Jan 04, 2007 1:28 pm

Simple in theory, this one - extentions to GetActorProperty which return the actor's current brightness (between 0 and 255) and the tag of the sector the actor is currently standing in (returning -1 if the sector in question has no tag assigned).

The only problem I can envisage with the first one is regarding GZDoom's dynamic lights. Perhaps in a case where an actor is partially lit by a dynamic light, some kind of average could be taken to determine the returned value?

I await your thoughts, and hopefully not an immediate [No]. :lol:

EDIT: finding the sector tag would probably be better suited to a separate function like GetCurrentSector or whatever, as it doesn't make much sense in the context of actor properties. Hmm.

EDIT #2: changed 'TID' to 'tag'. I was drunk when I posted this.
Last edited by Skippy on Fri Jan 05, 2007 2:44 am, edited 1 time in total.
User avatar
Skippy
is getting too old for this shiz
 
Joined: 20 Nov 2005
Location: Belfast, NI

Postby HotWax » Thu Jan 04, 2007 2:31 pm

The light level of a sector can already be retreived with GetSectorLightLevel, so if GetCurrentSector were added you could simply do:

Code: Select allExpand view
GetSectorLightLevel(GetCurrentSector(TID));


The only problem is that it would not take dynamic or point lights into consideration, as you pointed out, however I don't see an easy fix for that.

I second the addition of GetCurrentSector. It could be used for a number of effects.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Skippy » Thu Jan 04, 2007 8:11 pm

Thanks for your reply HotWax. I was aware of the GetSectorLightLevel function, however it would only become useful to me upon the implementation of the GetCurrentSector function. Even this would not be useful for what I require, though.

In short, I wish to extend the monster AI va a combination of custom states and ACS_ExecuteWithResult, and one of the effects I want to achieve is based on the 'visibility' of the player - a factor detemined by distance (already retreivable) and, hopefully, light level. And although I would love to see a GetCurrentSector function implemented (I'd love to see what you could do with it), it doesn't really fix my problem as I want to have my 'visibility check' acting across entire levels via a LOADACS lump, and the size/detail of the maps in question makes the tagging of each individual sector entirely prohibitive.

Okay, I'll admit, this is heading into Metal Gear/Splinter Cell territory, but I know that these suggestions would prove immensely useful outside of this scope. Anyone else got any ideas?
Last edited by Skippy on Fri Jan 05, 2007 2:45 am, edited 1 time in total.
User avatar
Skippy
is getting too old for this shiz
 
Joined: 20 Nov 2005
Location: Belfast, NI

Postby Grubber » Fri Jan 05, 2007 1:43 am

@HotWax: That would work only if every sector in the map had unique tag.
User avatar
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Skippy » Fri Jan 05, 2007 2:42 am

Oh yeah, for 'TID' read 'sector tag'. It was too early in the morning when I posted that. D'oh! :roll: [edits post]
User avatar
Skippy
is getting too old for this shiz
 
Joined: 20 Nov 2005
Location: Belfast, NI

Postby solarsnowfall » Thu Jan 11, 2007 7:17 am

Grubber wrote:@HotWax: That would work only if every sector in the map had unique tag.

Why do they all have to be unique? What's wrong with returning 0 or even a tag that's used multiple times?
User avatar
solarsnowfall
 
Joined: 30 Jun 2005

Postby HotWax » Thu Jan 11, 2007 8:41 am

Yeah, there need only be enough tags as there are unique light levels in this case. Since people usually go by 8's on the light level, that means you only need 32 unique tags, not including sectors which need a unique tag for other effects.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Skippy » Thu Jan 11, 2007 8:59 am

Thanks for your suggestions guys.

I like the idea of grouping sectors under a single tag based on a light level. However, it would become problematic over a larger map due to sectors requiring unique effects such as coloured lighting (as HotWax pointed out). Also, it would fall short when trying to determine the brightness of an actor, which is what my original suggestion was, as it wouldn't account for things like fullbright sprites - like a Lost Soul in a 0-level light room, for example. And there's still the problem of GZDoom lights...

For my own purposes, I could hack around the fullbright problem by calling an ACS function from the actor's DECORATE which 'flags' it as having a light level of 255 where needed. All I need now is a big [Yes] to GetCurrentSector(tid), and I can go. :)

Thanks for taking an interest.
User avatar
Skippy
is getting too old for this shiz
 
Joined: 20 Nov 2005
Location: Belfast, NI

Postby Xaser » Thu Jan 11, 2007 8:20 pm

I could very much see some major use for GetCurrentSector. No spoilers or anything though. :P
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby Skippy » Fri Jan 12, 2007 11:16 am

I'm sure many people, including myself, would find it invaluable.

I'd love to hear the developers' opinion on these two suggestions.

EDIT: I've just realised you could probably get a pretty close approximation of Korax, complete with manipulation of the surrounding play area, working in DECORATE and ACS with GetCurrentSector. Better boss battles? Reason enough for inclusion in my book (then again, it's not my book :wink: )
User avatar
Skippy
is getting too old for this shiz
 
Joined: 20 Nov 2005
Location: Belfast, NI

Postby HotWax » Fri Jan 12, 2007 1:43 pm

I'd love to hear from randy/Graf on this issue. It's a very basic informational function that could be very useful for several different reasons.

Can you at least let us know if this has a chance of being implemented?
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 5 guests