Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem with waves script #126865
04/27/07 18:07
04/27/07 18:07
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
Im trying to implement aum 34 the nice waves part.

i use the model provided and the code also

when i try run it in wed it appears funny

its missing a good chunk of it

can anyone help


here is the code below

define amplitude skill1;
define water_speed skill2;

define number_of_vertices 1089; // 33 x 33 in Med = 1089

////////////////////////////////////////////////////////////////////////////////////////

var vertex_array[number_of_vertices];
var counter;
var index;

////////////////////////////////////////////////////////////////////////////////////////

// uses amplitude, water_speed
action nice_waves
{
my.transparent = on;
my.passable = on;
my.alpha = 75;
my.ambient = -100;
if (my.amplitude == 0)
{
my.amplitude = 2; // default wave amplitude value
}
if (my.water_speed == 0)
{
my.water_speed = 10; // default wave speed value
}
counter = 0;
while (counter < number_of_vertices)
{
vertex_array[counter] = random(360); // set random values in vertex_array
counter += 1;
}
while (1)
{
index = 0;
while (index < number_of_vertices)
{
vec_for_mesh(temp, my, index); // store the vertex coordinates in temp
temp.z = sin(counter + vertex_array[index]) * my.amplitude; // change the z component
vec_to_mesh(temp, my, index); // deform the terrain entity
index += 1;
}
counter += my.water_speed * time;
wait(1);
}
}

Re: problem with waves script [Re: aslan123] #126866
04/27/07 18:12
04/27/07 18:12
Joined: Mar 2007
Posts: 98
münchen
X
xxxbmxsam Offline
Banned
xxxbmxsam  Offline
Banned
X

Joined: Mar 2007
Posts: 98
münchen
you must look for more nice waves codes in aum-magazin your nice wave code is to long and to strange...or so hihi i can not good speak english but i can better games playing is this right what i say....i dont no.

Last edited by xxxbmxsam; 04/27/07 18:13.
Re: problem with waves script [Re: xxxbmxsam] #126867
04/27/07 18:15
04/27/07 18:15
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
there are no more nice waves code
i think there is a problem with this part but im not sure

while (1)
{
index = 0;
while (index < number_of_vertices)
{
vec_for_mesh(temp, my, index); // store the vertex coordinates in temp
temp.z = sin(counter + vertex_array[index]) * my.amplitude; // change the z component
vec_to_mesh(temp, my, index); // deform the terrain entity
index += 1;
}
counter += my.water_speed * time;
wait(1);
}
}

Re: problem with waves script [Re: aslan123] #126868
04/27/07 18:59
04/27/07 18:59
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Happy Birthday Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
@darragh
plz write your code into the code-tags, it makes it a lot easier to read

the second thing: i guess you use chunkled terrain...rename the terrainmodel, so taht it ends with "_n"
If that dont help control the size of your terrain...it should be 33x33

if u copied the script exactly from the aum there shouldnt be a error in the script :]


btw: that are just nice waves, if u use a shader 4 it ;P

Re: problem with waves script [Re: Scorpion] #126869
04/27/07 19:04
04/27/07 19:04
Joined: Mar 2005
Posts: 969
ch
Loopix Offline
User
Loopix  Offline
User

Joined: Mar 2005
Posts: 969
ch
Try this one

Code:
define wave_amp, skill1;//set these skills in WED->properties
define wave_sp, skill2;

var water_vertex_array, [10000];//allows a waterplane of max 100x100 vertices

action nice_waves
{
var index;
var counter;
var number_of_vertices;

my.passable = on;
my.transparent = on;

if(my.skill1 == 0){my.skill1=1.5;}else{my.skill1=my.skill1;}
if(my.skill2 == 0){my.skill2=5;}else{my.skill2=my.skill2;}

while(1) {

number_of_vertices = ent_vertices(my);
water_vertex_array[ent_vertices(my)];

while (counter < number_of_vertices)
{
water_vertex_array[counter] = random(360); // set random values in vertex_array
counter += 1;
}
index = 0;

while (index < number_of_vertices)
{
vec_for_mesh(temp, my, index); // store the vertex coordinates in temp
temp.z = sin(counter + water_vertex_array[index]) * my.wave_amp; // change the z component
vec_to_mesh(temp, my, index); // deform the terrain entity
index += 1;

}
counter += my.wave_sp * time_step;

wait(1);
}
}




Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1