Modheight command

Post your scripting questions / solutions here

Moderator: Moderators

Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Modheight command

Post by Rookie One.pl »

Hi,

In the SDK it says:
modheight( String height )

change the maximum height of the player
can specify 'stand', 'duck', 'duckrun', or a specific height
When I execute e.g. modheight 24 on the player, it says 'unknown modheight '24', defaulting to stand'... Is there something I overlooked?

Rookie One
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Presumably g_allclasses.html is incorrect.
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

So that means I can forget about setting a custom height? :(
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

wouldnt you have to put

Code: Select all

modheight duckheight local.height
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Re: Modheight command

Post by Rookie One.pl »

modheight( String height )
No, because only 1 parameter is indicated here. Any ideas?
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

i hope you know this, a string is a bunch of letters, no numbers. thus they made stand crouch and prone as the only heights. probably mods their bounding box in relation to it. my guess it's hardcoded.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

thats the argument parameter, probably just the variable it throws the argument you put there into.

so String height recieves the thing you put in there. doesnt mean anything.

holy... forum did it again.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

oh so the command it gives when you hit ctrl (default) is modhight duck?
but dont count my idea out yet tho.. doesnt it say
modhight(string hight)
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Lizardkid, I'm not dumb. I know what it is and what it means. I just want to know why is it stated that you can cast an integer to it but practically it doesn't work. And there's no such height as prone - already tried that.
It doesn't change the bounding box, too. I tried manually using setsize with the Z arguments of 0 and 24 and nothing happened.

Fungus - yes. CROUCH_IDLE state from mike_legs.st is called which executes modheight "duck".
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

actually theres a prone state for AI,

$AIguy exec global/prone.scr

the forums messed again, i cant tell who i was telling String wat, think it was Dungus.
can specify 'stand', 'duck', 'duckrun', or a specific height
i think this means that if you add other states then you can use them.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

Fungus - yes. CROUCH_IDLE state from mike_legs.st is called which executes modheight "duck".
Me fell smrt :P

oh cmon, dont be that way Gizzard Kid... (Remember, D is right next to F, and G is only four keys from L :wink: )
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

modheight( String height )

change the maximum height of the player
can specify 'stand', 'duck', 'duckrun', or a specific height

it says string height not int:S:S??

why wud u try 24, i dont get this? like lizzard said its string? of set stuff..

so modheight stand wud set the player's height to standing , wich the state file then detects the player is standing and plays the acording anims to make the player stand.

just set a $ things that tell state file how to run:S>
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Well, it's my first attempt at messing with state files, so don't expect I'll know everything abut them. ;) I just did what it says - a specific height. The game dll could as well do a simple StrToInt call if it wouldn't match the preset strings (stand, duck and duckrun).
Elgan wrote:just set a $ things that tell state file how to run:S>
What do you mean? Could you be more specific, please? :)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

well. the states check for height like they check for other things.


lets look at falling .


state LAND_DUCKED
{
entrycommands
{
movementstealth "0.5"
moveposflags "crouching"
}
states
{
STAND : HARD_IMPACT !CROUCH CHECK_HEIGHT "stand"
CROUCH_IDLE : default
}
}

the naims for going from crouch to stand uw dof finished. so ur height is now standing. so then it goes to STAND.

if it didnt and ur height is still "crouching" then it plays default.
if u get that?

if u did.

self modheight "crouching"

then

states

STAND : CHECK_HEIGHT "stand"

CROUCH : CHECK_HEIGHT "crouching"

crouching wud run..
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Well, that's not what I asked for. I want to make the player's height custom, neither stand, nor duck, nor duckrun.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply