SOLVED
As usual as soon as I posted this I remembered about $XYZ.setShaderParm( 7, sys.getTime() );
That solved my issue!
Hey guys,
I've been playing around with a teleport type effect.
The problem I am having is that unless I trigger the material almost instantly, it doesn't work, something to do with the time in the material, but I don't understand how to use it correctly. If I don't use time it doesn't work properly.
https://www.youtube.com/watch?v=wCdHMYCJlO4& this is what it looks look after a 3 second delay from spawning in the level
this is what it looks like if I trigger it manually or wait too long https://www.youtube.com/watch?v=OToZ4XnlGFI&
this is my material
textures/wicky02/player_body
{
{ // burning corpse effect
if ( parm7 == 1) // only when dead
// make a burned away alpha test for the normal skin
blend gl_zero, gl_one // don't draw anything
map textures/wicky02/intro/body_burn.tga // replace this with a monster-specific texture
alphaTest 0.1 + 0.1 * (time * 1)
}
{ // burning corpse effect
if ( parm7 == 1) // only when dead
// draw the fire burn at a negative polygonOffset, so it is behind the other stages
privatePolygonOffset -1 // stage-only polygon offset
blend add
blend gl_one, gl_zero
map textures/wicky02/intro/body_burn.tga // replace this with a monster-specific texture
alphaTest 0.1 * (time * 1)
}
diffusemap models/characters/player/body.tga
specularmap models/characters/player/body_s.tga
{
blend bumpmap
map addnormals(models/characters/player/body_local.tga, heightmap(models/characters/player/body_h.tga, 5 ) )
}
}
I tried searching in all the script files, but don't know how to fix this.
I trigger the static_mesh using a target_setshader and it works for other objects that aren't use a burn effect.
Thanks for any help anyone can offer.
I forget exactly where and what (I have the code on my machine somewhere) but there is a glitch with stock D3 and particle/fade times. It's fixed in D3XP. I'll look it up tonight/in the morning. It was how I got my flamethrower to work properly.
Quote from: The Happy Friar on October 05, 2014, 12:58:49 PM
I forget exactly where and what (I have the code on my machine somewhere) but there is a glitch with stock D3 and particle/fade times. It's fixed in D3XP. I'll look it up tonight/in the morning. It was how I got my flamethrower to work properly.
Yeah I know about those issues, delays and durations are kind of broken in the fx files. Fade times work perfectly though for me.
But my issue wasn't with particles.