SetActorViewHeight

Moderator: GZDoom Developers

Post Reply
P1ayer27
Posts: 203
Joined: Fri Aug 14, 2009 10:05 pm

SetActorViewHeight

Post by P1ayer27 »

I'm making a mod where players can become incapacitated if their health gets too low, and other marines can restore their health and whatnot... But, instead of spawning a camera, I was hoping to actually change the viewheight of the marine... Which doesn't seem possible yet. (The marine will still be able to shoot while he's on the ground, so without doing anything hackish I think the easiest way to do this would be with a SetActorViewHeight function.) I don't see why this would be abuse prone, since we can already set the viewheight of players, just not dynamically. So... Feedback?
P1ayer27
Posts: 203
Joined: Fri Aug 14, 2009 10:05 pm

Re: SetActorViewHeight

Post by P1ayer27 »

Bumpity bump.
Thomas
Posts: 53
Joined: Wed May 30, 2007 2:13 pm
Location: The Netherlands

Re: SetActorViewHeight

Post by Thomas »

http://www.zdoom.org/wiki/Classes:PowerMorph

make a new player class with lower viewheight and morph to it when you are on the ground.
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: SetActorViewHeight

Post by FDARI »

That's a good idea, but it isn't necessarily applicable to all situations, and it is a little hacky.
If multiple playerclasses: Each distinct player class will require its own morph class just to get the altered viewheight.
If morph is used in the game: The player in question might already be morphed, and you might want the viewheight to affect the current morphed class. You might be able to fix this by having specific altered morph classes for standard morph classes.

Also, SetActorViewHeight seems feasible, but the concept of morphing might complicate it.
If SetActorViewHeight is called on an actor, its view height would be set for its current form. If the form is altered, the change is probably lost. When the form is restored, default view height is likely to be set. You could possibly add a morph-flag to keep view height on morph, and on unmorph, but I think they'd be bad news.

Ok. My guess is that you can do SetActorViewHeight, but that any other effect that temporarily or permanently alters actor viewheight is expected (perhaps guaranteed) to cancel such changes.
User avatar
Enjay
 
 
Posts: 27251
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: SetActorViewHeight

Post by Enjay »

If what you are doing is for GZDoom, I'm sure that there is a Fragglescript instruction that allows you to change the viewheight. I used it once to simulate the player getting up off the ground after being knocked out on the previous level. Unfortunately, I no longer have the map so I don't remember the syntax.

[edit]

Heh
http://forum.drdteam.org/viewtopic.php?f=22&t=2909

[/edit]
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: SetActorViewHeight

Post by Gez »

ZDoom has [wiki]FraggleScript[/wiki] too now.

However, when I browsed through the code, I saw a few blatant bugs and other Things That Just Cannot Work At All (my favorites: ObjState and ModifyHUPic), so I wouldn't recommend using it.
User avatar
Enjay
 
 
Posts: 27251
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: SetActorViewHeight

Post by Enjay »

Gez wrote:ZDoom has [wiki]FraggleScript[/wiki] too now.
Oh, I hadn't realised. Thanks for pointing it out.
Gez wrote:However, when I browsed through the code, I saw a few blatant bugs and other Things That Just Cannot Work At All (my favorites: ObjState and ModifyHUPic), so I wouldn't recommend using it.
It's certainly far from perfect but, in the absence of anything else, a simple script like this could perhaps solve the problem at hand. I certainly wouldn't recommend it as a wholesale solution though and the fact that it's implementation is quite different to the lumps and scripts that ZDoomers are familiar with also makes it feel a bit strange to use. A proper, native ZDoom solution would, of course, be better.
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: SetActorViewHeight

Post by Ed the Bat »

Since this can now be done with SetActorProperty, this can be closed?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”