Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
waterfall #140658
07/12/07 09:01
07/12/07 09:01
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
hallo

i had a waterfall using my.u*time; but now i donwloaded 6.60 the waterfall doesnt work any more

some were i read it has been changed to fx_uvspeed but i dont know ow this work

//The undocumented texture shifting by u,v parameters and by material scale parameters was discontinued for models (it still works for sprites). For texture shifting apply the fx_uvspeed action from the mtlFX template, which is faster and easier to use than u,v parameters. The uv shifting effect also works with the Standard and Extra editions.

thanks for your help


"empty"
Re: waterfall [Re: flits] #140659
07/12/07 17:47
07/12/07 17:47
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
in the templates there is a small code to do it...if you included the template give your model the action fx_uvspeed...if not also include this code to your script:

Code:
function mtl_copy(mtl_source)
{
mtl_temp = mtl_source;
vec_set(mtl.ambient_blue,mtl_temp.ambient_blue);
vec_set(mtl.specular_blue,mtl_temp.specular_blue);
vec_set(mtl.diffuse_blue,mtl_temp.diffuse_blue);
vec_set(mtl.emissive_blue,mtl_temp.emissive_blue);
mtl.power = mtl_temp.power;
mtl.albedo = mtl_temp.albedo;
}

function mtl_uvspeed_render()
{
// using the material matrix:
// u' = u * mtl.matrix11 + v * mtl.matrix21 + mtl.matrix31;
// v' = u * mtl.matrix12 + v * mtl.matrix22 + mtl.matrix32;
mtl.matrix31 = floatd(my.skill1*total_ticks,256);
mtl.matrix32 = floatd(my.skill2*total_ticks,256);
}

function mtl_uvspeed_init()
{
// copy standard model material properties
mtl_copy(mat_model);
mat_identity(mtl.matrix);
mtl.event = mtl_uvspeed_render;
mtl.ENABLE_RENDER = on;
}

MATERIAL mtl_uvspeed =
{
event = mtl_uvspeed_init;
effect = "
matrix matMtl;

technique uvspeed
{
pass one
{
TextureTransformFlags[0] = Count2;
TextureTransform[0] = <matMtl>;
}
}
technique fallback { pass one { } }
";
}

//action: fx_uvspeed
//title: Texture shifting in u and v direction
//
//skill1: Speed_U 0
//help: Texture Speed in U direction, default 0
//skill2: Speed_V -2
//help: Texture Speed in V direction, default -2
//desc:
//desc: Shifts a texture in u and v direction.
//desc: To be assigned to a model.
//
action fx_uvspeed()
{
my.material = mtl_uvspeed;
if (0 == my.skill1 && 0 == my.skill2) { my.skill2 = -2; }
}



Last edited by Scorpion; 07/12/07 19:00.
Re: waterfall [Re: Scorpion] #140660
07/12/07 18:25
07/12/07 18:25
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
thx

but i am not so good in matariel
i get an error on this line

mtl_copy(mat_model);
thank you


"empty"
Re: waterfall [Re: flits] #140661
07/12/07 18:54
07/12/07 18:54
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
edit: ok i got it... this is the function:

Code:
function mtl_copy(mtl_source)
{
mtl_temp = mtl_source;
vec_set(mtl.ambient_blue,mtl_temp.ambient_blue);
vec_set(mtl.specular_blue,mtl_temp.specular_blue);
vec_set(mtl.diffuse_blue,mtl_temp.diffuse_blue);
vec_set(mtl.emissive_blue,mtl_temp.emissive_blue);
mtl.power = mtl_temp.power;
mtl.albedo = mtl_temp.albedo;
}




PS: i just copied the code from the templates...

Last edited by Scorpion; 07/12/07 18:59.
Re: waterfall [Re: Scorpion] #140662
07/12/07 20:40
07/12/07 20:40
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
thx i am stuppid i did try this before i made this topic but i said i didnt know how materails work en i need to change some things because it now look realy wierd
from the helft of my entity hij is boosting until the and.

thx many time's i hope i learn materials very vast so my games be less ugly;

i addthis my self for working it

MATERIAL* mtl_temp;

its just a small thing but i did get a bounce of errors

thx thx thx


"empty"
Re: waterfall [Re: flits] #140663
07/12/07 20:41
07/12/07 20:41
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
close topic


"empty"
Re: waterfall [Re: flits] #140664
07/13/07 18:04
07/13/07 18:04
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline

Expert
Realspawn  Offline

Expert

Joined: Jul 2001
Posts: 4,801
netherlands


Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: waterfall [Re: Realspawn] #140665
07/14/07 18:37
07/14/07 18:37
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
doesnt work any more i said i used u and v X speed

6.6 version


"empty"

Gamestudio download | chip programmers | 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