scripting, how can i set the line GetActorViewHeight
Moderator: Graf Zahl
-
- Posts: 103
- Joined: Tue May 04, 2010 7:57
scripting, how can i set the line GetActorViewHeight
hi can somebody help me about the view height of the player?
i have this:
script 4 enter
//player view height
{
GetActorViewHeight(x,y,z coordinators???);
I dont know the normal coordinators/settings of the player. also i dont know if i get trouble with jumping and crouching. I must adjust the speed and height of crouching if possible. How the sprites gonna work out, i think that the sprites gonna be set apart from that, also i dont know if i can adjust that to one y coordinators to the camera height value is the same as the gun sprite height coordinator so that i know what the excactly height is to adjust the weapon sprites easy to the players view height coordinator. so i can adjust the height value for each weapon in a easy way or is that already sticked with the player view height?
and I do not mean the 3rd person view mode height but the eyeview height.
here is it on zdoom wiki: http://www.zdoom.org/wiki/GetActorViewHeight
i have this:
script 4 enter
//player view height
{
GetActorViewHeight(x,y,z coordinators???);
I dont know the normal coordinators/settings of the player. also i dont know if i get trouble with jumping and crouching. I must adjust the speed and height of crouching if possible. How the sprites gonna work out, i think that the sprites gonna be set apart from that, also i dont know if i can adjust that to one y coordinators to the camera height value is the same as the gun sprite height coordinator so that i know what the excactly height is to adjust the weapon sprites easy to the players view height coordinator. so i can adjust the height value for each weapon in a easy way or is that already sticked with the player view height?
and I do not mean the 3rd person view mode height but the eyeview height.
here is it on zdoom wiki: http://www.zdoom.org/wiki/GetActorViewHeight
- Salad Viking
- Posts: 40
- Joined: Mon Aug 23, 2010 21:50
- Location: A hot air balloon traveling over Chile
Re: scripting, how can i set the line GetActorViewHeight
I don't really know what you're talking about, but [wiki]GetActorViewHeight[/wiki] returns the absolute Z-coordinate of an actor's (in this case, the player) viewing position (accounting for adjustments to the view height, such as in the case of crouching), and [wiki]GetActorX[/wiki], [wiki]GetActorY[/wiki], and [wiki]GetActorZ[/wiki] get the absolute coordinates of the player. So you can subtract the Z-coordinate of the player from its view height and you get the height of the player's view relative to the ground.
IMPORTANT NOTE: All those functions I mentioned return fixed-point values, which means that, to get the floating-point value of them, you must divide them by 65536 (0xFFFF as an unsigned short). Considering you've chosen to call yourself "doomexpert", I'll bet you already knew that.
IMPORTANT NOTE: All those functions I mentioned return fixed-point values, which means that, to get the floating-point value of them, you must divide them by 65536 (0xFFFF as an unsigned short). Considering you've chosen to call yourself "doomexpert", I'll bet you already knew that.

- NeuralStunner
- Posts: 253
- Joined: Tue Dec 29, 2009 3:46
- Location: IN SPACE
- Contact:
Re: scripting, how can i set the line GetActorViewHeight
What. Did you actually read the page you linked?Salad Viking wrote:I don't really know what you're talking about, but [wiki]GetActorViewHeight[/wiki] returns the absolute Z-coordinate of an actor's (in this case, the player) viewing position (accounting for adjustments to the view height, such as in the case of crouching), and [wiki]GetActorX[/wiki], [wiki]GetActorY[/wiki], and [wiki]GetActorZ[/wiki] get the absolute coordinates of the player. So you can subtract the Z-coordinate of the player from its view height and you get the height of the player's view relative to the ground.
ZDoom Wiki wrote:For a player, this corresponds to the Player.ViewHeight property, modified by crouching if needs be. For other actors, it corresponds to the CameraHeight if one is defined, or defaults to half their height otherwise.
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
- Salad Viking
- Posts: 40
- Joined: Mon Aug 23, 2010 21:50
- Location: A hot air balloon traveling over Chile
Re: scripting, how can i set the line GetActorViewHeight
What do you mean?NeuralStunner wrote:What. Did you actually read the page you linked?
-
- Posts: 103
- Joined: Tue May 04, 2010 7:57
Re: scripting, how can i set the line GetActorViewHeight
next
Last edited by doomexpert on Wed Feb 23, 2011 21:12, edited 2 times in total.
-
- Posts: 103
- Joined: Tue May 04, 2010 7:57
Re: scripting, how can i set the line GetActorViewHeight
i know i must use the z coordinator but i cant get the scripting to work. I have this:
script 4
{
getactorviewheight (1);
}
so the number is the thing id and i have it already set the player 1 to id number 1 so it know the connection. but no height value..
now you have arguments like:
GetActorZ (0)
Thing_ChangeTID
but i need to inserting the value, i dont know what to type to change the value
i need only to get the view height of the player heigher, settings like crouch height is already good.
script 4
{
getactorviewheight (1);
}
so the number is the thing id and i have it already set the player 1 to id number 1 so it know the connection. but no height value..
now you have arguments like:
GetActorZ (0)
Thing_ChangeTID
but i need to inserting the value, i dont know what to type to change the value
i need only to get the view height of the player heigher, settings like crouch height is already good.
- Salad Viking
- Posts: 40
- Joined: Mon Aug 23, 2010 21:50
- Location: A hot air balloon traveling over Chile
Re: scripting, how can i set the line GetActorViewHeight
Well, first you need to be sure that the player indeed has a TID of 1. To do this, you must use a script like this one:
If you have something like that (including any number of other statements inside the same script), then you're good on the TID.
Now you can use GetActorViewHeight(1) and it will return the ViewHeight property of the player - contrarily to what I said (after testing it out) this is NOT an absolute value (I see what you mean now, NeuralStunner. The wiki page was too ambiguous). If you want to get the absolute Z-coordinate of the player's view height, you would use a line of code like this:
If you want to change the view height of the player, you need to create a new player class and override the Player.ViewHeight actor property. See Creating new player classes for a guide on creating new player classes.
Code: Select all
script 100 ENTER {
Thing_ChangeTID(0, 1);
}
Now you can use GetActorViewHeight(1) and it will return the ViewHeight property of the player - contrarily to what I said (after testing it out) this is NOT an absolute value (I see what you mean now, NeuralStunner. The wiki page was too ambiguous). If you want to get the absolute Z-coordinate of the player's view height, you would use a line of code like this:
Code: Select all
GetActorViewHeight(1) + GetActorZ(1)
-
- Posts: 103
- Joined: Tue May 04, 2010 7:57
Re: scripting, how can i set the line GetActorViewHeight
wow creating a new player class? so if i must create a new player class then i can always watch the current playerclass back and change it. so i can telll to acs the current height and to change it to whatever i want, like its not an original setting. this engine of zdoom it must be a easy way too adjust the settings of a player class in some weird way i think. so you mean that it cant be done with only scripting? all the thinks and everything goes through acs (scripting) whatfor is the option getactorviewheight? what does that mean? now im confusing. if its logic then i think its possible to adjust the height of a player. the program whacked2 is better then dehacked. so i have w7 64 bit and cant use dehacked anymore, such as old programs like that. maybe some do. i have xwe a very good program and does work under windows 7 64 bit.Salad Viking wrote:Well, first you need to be sure that the player indeed has a TID of 1. To do this, you must use a script like this one:If you have something like that (including any number of other statements inside the same script), then you're good on the TID.Code: Select all
script 100 ENTER { Thing_ChangeTID(0, 1); }
Now you can use GetActorViewHeight(1) and it will return the ViewHeight property of the player - contrarily to what I said (after testing it out) this is NOT an absolute value (I see what you mean now, NeuralStunner. The wiki page was too ambiguous). If you want to get the absolute Z-coordinate of the player's view height, you would use a line of code like this:If you want to change the view height of the player, you need to create a new player class and override the Player.ViewHeight actor property. See Creating new player classes for a guide on creating new player classes.Code: Select all
GetActorViewHeight(1) + GetActorZ(1)
would someone post a example wad of the players view height with only scripting? eye height is normally 41. now i want it too set it to 60/70 eye view. people have adjust the speed and height and everything with a simple dos program back in 1991, and its seems even harder to do that with windows xp or windows 7. because of that programs that's have limited options like that.
- Salad Viking
- Posts: 40
- Joined: Mon Aug 23, 2010 21:50
- Location: A hot air balloon traveling over Chile
Re: scripting, how can i set the line GetActorViewHeight
You must create a new player class. There is no alternative. And Doom wasn't released until December 1993, so there couldn't have been any mods you played in 1991. (Though it is true that DeHackEd can change things like mobj height, speed, radius, etc., it is highly recommended that you do not use DeHackEd unless you're making a Boom-specific mod)
And, FFS, can you please post in legible English?
And, FFS, can you please post in legible English?