AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Water Waves (https://forums.alliedmods.net/showthread.php?t=60997)

skyjur 09-18-2007 11:48

Water Waves
 
Is there a way to change water waves height?

I looked throught all pev_* and could not find anything useful. I don't know where else to search.

potatis_invalido 09-19-2007 04:59

Re: Water Waves
 
You have probably already tryed it, but maybe set_pev(water_ent, pev_waterlevel, <integer or float, not shure>) will work?

Wilson [29th ID] 09-19-2007 05:47

Re: Water Waves
 
If that doesn't work, use BSP Edit and view the water entity of the map and try and find the keyvalue that sets the level. You can then edit the keyvalue.

ConnorMcLeod 12-01-2010 11:04

Re: Water Waves
 
Just to answer the question as it may be usefull for anyone :

When water is func_water, change pev_scale value (set to 0.0 for no wave).
When water is part of world, change svar sv_wateramp (sv_wateramp 0 in amxx.cfg for example).

From HLSDK :

dlls/world.cpp
Code:

void CWorld :: KeyValue( KeyValueData *pkvd )
{
        // [...]
        else if ( FStrEq(pkvd->szKeyName, "WaveHeight") )
        {
                // Sent over net now.
                pev->scale = atof(pkvd->szValue) * (1.0/8.0);
                pkvd->fHandled = TRUE;
                CVAR_SET_FLOAT( "sv_wateramp", pev->scale );
        }

dlls/doors.cpp
Code:

void CBaseDoor::KeyValue( KeyValueData *pkvd )
{
        // [...]
        else if (FStrEq(pkvd->szKeyName, "WaveHeight"))
        {
                pev->scale = atof(pkvd->szValue) * (1.0/8.0);
                pkvd->fHandled = TRUE;
        }



All times are GMT -4. The time now is 16:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.