Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: passing values to Effects. [Re: Beorn] #21424
12/23/03 06:00
12/23/03 06:00
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
So the effect system is your problem, not the fixed function effect itself.

Just use the my pointer in your material event, it's as easy as that.

Re: passing values to Effects. [Re: Alexander Esslinger] #21425
12/23/03 11:38
12/23/03 11:38
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
Thank You very much Alexander, I did try everything except using MY in Material Event.
Unfortunately it still doesnt work. The last entity that uses the material, sets the amount of displacement for all that is uding the same material.

Ive tried changing so that i have different HMp models for entities, and lots of other stuff. But i have no luck.

I thought that this text from the readbeta was the ticket:

Quote:

material.enable_render
If this flag is set, the material's event function is executed at the
beginning of every entity rendering, if the material contains an
effect and was assigned to the entity. This can be used to perform
effect calculations based on entity skills or the entity's world
matrix.




Another funny thing is that im only allowed to use the MY pointer in the material event if i state further MTL.EVENTS.
If i only use event=function(); in the actual MATERIAL definition, i get "EmPTY POINTER all the time.

I hope there is something that i still dont understand.

And thanks again for your help.

Merry Christmas!

Re: passing values to Effects. [Re: Beorn] #21426
12/23/03 12:03
12/23/03 12:03
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
Your assign the event wrong, do it without the brackets. If it still not work, do the following:

Set the event function and the enable_render flag in the effect defination. Then set up the matrix in the event function, but only in the event, not in an entity action. That should work!

We don't have Chrismas yet, but I think that I'll be bussy tomorrow, so... marry Chrismas!

Re: passing values to Effects. [Re: Alexander Esslinger] #21427
12/23/03 12:32
12/23/03 12:32
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
Yah, good to see im not the only night dweller!

But it still wont work. The bracket thing didnīt matter. And i cant place any of the stuff inside the effect definition. I just get loads of syntax errors. Prolly me not knowing how to do it proper.

I tried finding the equivalent commands in dx8 documantation from MS, but that is not an easy task.

Thanks a lot anyways. Hope i can help you back sometime. You need any models or such, just gimme a hint.

Re: passing values to Effects. [Re: Beorn] #21428
12/23/03 23:00
12/23/03 23:00
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
For speeding this up a little, you could post your code here or send it to me on any other way, then I can quickly find your mistake.

Re: passing values to Effects. [Re: Alexander Esslinger] #21429
12/31/03 12:46
12/31/03 12:46
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
Alexander,

Sorry for the silence. The flu got me big time. Here the code. In this example im simply trying to give each entity different texture scaling, but they all end up with the same.

Note: The entities are created in runtime by another entity and given the same Action. They use the same model. They all have different skill2 values.


Code:
 bmap testsquares = <testsquares50.tga>;


function mtl_terr_view()
{

mtl.matrix22 = floatd(mtl.skill1,1);
mtl.matrix11 = floatd(mtl.skill1,1);

}

function mtl_terrer_init
{
mtl.skill1 = my.skill2*10;
mtl.event = mtl_terr_view;
mtl.enable_render=on;

}


material terry
{

skin1 = testsquares;
event = mtl_terrer_init;

effect ="

texture entSkin1;
texture mtlSkin1;

matrix matMtl;

technique scalex
{
pass p0
{

Texture[0]=<mtlSkin1>;

ColorArg1[0]=Texture;
ColorOp[0]=SELECTARG1;

TextureTransformFlags[0] = count2; // use u,v values
TextureTransform[0] = <matMtl>;
}

}
";
}




Re: passing values to Effects. [Re: Beorn] #21430
01/01/04 01:32
01/01/04 01:32
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
Why do you use mtl.skill1? Use my.skill1 directly in your mtl_terr_view() function. That should be all.

And for scaling use floatr(), not floatd().

Re: passing values to Effects. [Re: Alexander Esslinger] #21431
01/01/04 13:08
01/01/04 13:08
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
Thanks.

Because i get two of this, and then the effect dies:

Quote:

Malfunction W1501: Empty pointer in mtl_terr_view: mtl.matrix22=floatr(my.skill2)





As soon as i try to use any "my.skill" in the "last" event function of an effect. This goes for all of my materials/effects.

In the the second (INIT), i can use my.skill w/o problems but they are only run once.

Any ideas?

Re: passing values to Effects. [Re: Beorn] #21432
01/02/04 04:37
01/02/04 04:37
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
The my pointer should be avaiable in the material event function, so it normally should work. I guess it's an engine bug, try posting it in the bug forum.

Re: passing values to Effects. [Re: Alexander Esslinger] #21433
01/02/04 06:28
01/02/04 06:28
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
Yes, i was starting to think the same. It doesnt make sense.
Thanks again.

Page 2 of 2 1 2

Moderated by  Blink, Hummel, Superku 

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