player view height variable

Moderator: GZDoom Developers

User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

player view height variable

Post by DOOMERO-21 »

add this new code for edit the player view height any time with acs like a new setplayerproperty
User avatar
FireHusky
Posts: 130
Joined: Sun Nov 25, 2012 3:02 pm

Re: player view height variable

Post by FireHusky »

Alex in Wonderland! :)
That would be a nice feature as well!
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: player view height variable

Post by Ed the Bat »

This would be incredibly useful for clearing out a lot of overhead in my project, so I fully support this suggestion.:)
Also, in the same vein, would a property for AttackZOffset also be possible? These kinda go hand-in-hand for some things I'm hoping to do.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: player view height variable

Post by DOOMERO-21 »

any chance to apply this?

i was waiting since july of 2012.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: player view height variable

Post by Ed the Bat »

I also would very much like to see this. Incidentally, making this an option for Set/GetPlayerProperty could also deprecate the GetActorViewHeight function, which seems to be flawed as it is, since it apparently can't accept 0 as Activator, like so many other functions.
User avatar
Ral22
Posts: 531
Joined: Sun Sep 05, 2010 12:09 pm
Preferred Pronouns: He/Him
Location: The Fortress of Dr. Radiaki
Contact:

Re: player view height variable

Post by Ral22 »

Count me as a plus one on this feature. I could make some clever and neat things using this!
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: player view height variable

Post by Ryan Cordell »

Think I'll give it a shot and prototype it in ToB today, see how it turns out.
User avatar
Ral22
Posts: 531
Joined: Sun Sep 05, 2010 12:09 pm
Preferred Pronouns: He/Him
Location: The Fortress of Dr. Radiaki
Contact:

Re: player view height variable

Post by Ral22 »

Ryan Cordell wrote:Think I'll give it a shot and prototype it in ToB today, see how it turns out.
Man, Ryan. Has anyone ever told you you're the best?
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: player view height variable

Post by Ryan Cordell »

SetPlayerProperty doesn't really influence the player's properties in any way. SetActorProperty is sooner what one would be looking for. There is, also, ACSF_GetActorViewHeight in the source, so one should wonder if "APROP_ViewHeight" should be a SetActorProperty only thing or a separate ACS function?
User avatar
Ral22
Posts: 531
Joined: Sun Sep 05, 2010 12:09 pm
Preferred Pronouns: He/Him
Location: The Fortress of Dr. Radiaki
Contact:

Re: player view height variable

Post by Ral22 »

I could gladly live with either one. If we maybe wanted to wrangle with more additions, like a setting on whether the height change is instant or goes up/down at a rate, it should be a separate function.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: player view height variable

Post by Xaser »

Does anything but a player have a "viewheight" sort of variable, though? It probably only exists in the player_t struct, so it'd be undefined for any nonplayer actors. Set/GetActorProperty wouldn't really be the place for it, as such.
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: player view height variable

Post by Nash »

According to http://zdoom.org/wiki/Actor_properties every actor has a CameraHeight property. I don't know if the player uses the same variable or if the player's viewheight is something different?
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: player view height variable

Post by Ed the Bat »

Ryan Cordell wrote:SetPlayerProperty doesn't really influence the player's properties in any way. SetActorProperty is sooner what one would be looking for.
Right, right, that's the one I was thinking of. My mistake.
Xaser wrote:Does anything but a player have a "viewheight" sort of variable, though?
Looks like it.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: player view height variable

Post by Xaser »

Ah, okay. I guess the tricky part though would be that the function can't readily assume a single property, since for players there's a special case. I guess this is why there's a separate function for this in the first place. Dunno off the top of my head how hard/hacky it would be to wrap this up into SetActorProperty.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: player view height variable

Post by Ed the Bat »

The effect that crouching has on a player's viewheight may also need to be taken into account. So, checking this property on a crouched player may need to understand that it's 1/2 of the 'real' current viewheight.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”