orig: act_changewater_-550_200 <-- or somewhere like that, then whenI edited it then tried to test it, the error message looks like this.
Script error EXPRESSION in AA_changewater
then
Right eval
both have question Continue running executable?
the script i have written/copied is as follows
begin AA_changewater
short changelevel
short crankturn
short currcrank
short initialized
float lowheight
float highheight
float newwaterlevel
float direction
float waterlift
float changerate
float targetheight
float current
float thischange
if ( initialized == 0 )
set lowheight to -128
set highheight to 1400
set changerate to 10
set initialized to 1
endif
if ( MenuMode )
return
endif
;always set angle to make up for different data
SetAngle X crankturn
set current to GetWaterLevel
if ( OnActivate == 1 )
if ( changelevel == 0 )
if ( current >= highheight )
set direction to -1
set targetheight to lowheight
else
set direction to 1
set targetheight to highheight
endif
set changelevel to 1
PlaySound3D "Dwemer Door Open"
endif
endif
if ( changelevel == 0 )
return
endif
set crankturn to 360 * GetSecondsPassed
set crankturn to crankturn * direction
set currcrank to GetAngle X
set crankturn to currcrank + crankturn
if ( current != targetheight )
set thischange to ( changerate * GetSecondsPassed )
if ( direction == 1 )
if ( thischange < 0 )
set thischange to ( thischange * -1 )
endif
set current to ( current + thischange )
if ( current > targetheight )
set current to targetheight
endif
else
if ( thischange > 0 )
set thischange to ( thischange * -1 )
endif
set current to ( current + thischange )
if ( current < targetheight )
set current to targetheight
endif
endif
SetWaterLevel current
endif
if ( direction == 1 )
if ( current >= highheight )
set changelevel to 0
endif
else
if ( current <= lowheight )
set changelevel to 0
endif
endif
end AA_changewater
please, im only a begginer at scripting and I NEED your help, kthnxbai :banghead: