Lagans water script

hi

just got my hands on the water script (thanks Lagan)

i’m trying to have a game where changing properties on the fly will change the intensity of an ocean.

Is it possible to chnage these features in realtime?

cheers

rene.

Sure heres a way without using a script:
. Delete the property name SETTING and create three new properties:
int: loop
Float: force, height

. Now change the line on the top of the script:
“loop = eval(current_own.SETTING)[0]”
“force = eval(current_own.SETTING)[1]”"
“height = eval(current_own.SETTING)[2]”"

to:

“loop = current_own.loop”
“force = current_own.force”
“height = current_own.height”

Now you can change the values of loop, force, height individually in realtime using the property actuator.

excellent!!! :smiley:

can’t wait to play around with it this weekend - thanks again Lagan.

hi again - just had a play around but couldn’t get the above instructions to work :expressionless:

i downloaded the script from
http://www.angelfire.com/dragon/hykubenjiro/watergen.zip?

it appears to be different, instead of the line
“height = eval(current_own.SETTING)[2]”
it says
“verleng = current_mesh.getVertexArrayLength(0)”
when i change it to
“height = current_own.height”
(and the rest as instructed) the water won’t move at all.

i had key commands connected to property actuators linked to the same mesh but i’m assuming this is not where the problem is as i changed this one line in the orginal script and added a value to the SETTING string but this didn’t work either.

any advice? perhaps a place to get the other script?

cheers

correction to last

following instructions i can change the loop and force on the fly, just not the hight/verlength

me again :expressionless:

read the forum where the script first went up, said that collision couldn’t be adjusted in realtime, i tried parenting an object to the water but it didn’t bob up and down either, is there a way for this to happen without a script applying this formula to the position of the boat? b/c sadly coding that’s outside my expertise :frowning:

i’m trying to have an image where the strength of an ocean is varied in realtime, parenting is fine as the boat needs to stay within the range of the still camera. it’s for an installation - plan on triggering the ocean with motion sensors. anyway, i hope someone can give me some advice

cheers

I will change the script so it bobs up and down. (The actual object not the vertice)