Page 1 of 2

Modheight command

Posted: Sat Mar 05, 2005 7:09 pm
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

Posted: Sat Mar 05, 2005 8:15 pm
by jv_map
Presumably g_allclasses.html is incorrect.

Posted: Sat Mar 05, 2005 8:25 pm
by Rookie One.pl
So that means I can forget about setting a custom height? :(

Posted: Sat Mar 05, 2005 8:29 pm
by Master-Of-Fungus-Foo-D
wouldnt you have to put

Code: Select all

modheight duckheight local.height

Re: Modheight command

Posted: Sat Mar 05, 2005 8:34 pm
by Rookie One.pl
modheight( String height )
No, because only 1 parameter is indicated here. Any ideas?

Posted: Sat Mar 05, 2005 9:33 pm
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.

Posted: Sat Mar 05, 2005 9:38 pm
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.

Posted: Sat Mar 05, 2005 9:41 pm
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)

Posted: Sat Mar 05, 2005 9:53 pm
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".

Posted: Sat Mar 05, 2005 10:46 pm
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.

Posted: Sat Mar 05, 2005 11:19 pm
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: )

Posted: Sun Mar 06, 2005 3:20 am
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>

Posted: Sun Mar 06, 2005 10:25 am
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? :)

Posted: Sun Mar 06, 2005 3:32 pm
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..

Posted: Sun Mar 06, 2005 4:20 pm
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.