I'm trying to change the surface type (mat_concrete => mat_water) of a GeomEntity using a event with a DestroyableObject.
First, I tried using a Entity:Material : when the game start, the GeomEntity has the texture floor.cfg with a surface type mat_concrete ; and when the DestroyableObject is dead, the texture is suppose to change to floorwet.cfg (where of course the surface type is mat_water). It didn't work.
Second, I tried using 2 GeomEntity : when the game start, the GeomEntity which has the texture floor.cfg is unhidden and the GeomEntity which has the mat_water surface type is hide. When the DestroyableObject is dead the first GeomEntity is hide and the second one is unhidden. It didn't work too.
The two options is in the same flowgraph in the attached files.
One precision very odd. If, instead of only change the surface type, I changed the diffuse color in the lighting settings it works, the diffuse color change with the both option with the same flowgraph (so I suppose my flowgraph is correct). Of course if I change the diffuse color AND the surface type, only the diffuse color is changes. Another precision : I'm using sandbox with crysis 2, not the CryEngine3 SDK
I don't know if I'm doing bad or if it's "normal"
I'm open to any suggestions.
edit : show options in the picture
Last edited by Mael8 on 12.07.2012, 15:31, edited 1 time in total.
You flowgraph contains a logical flaw. In your FG you hide GeomEntity1 and apply some material to it...of course you won't see any result because the entity is hidden. So what's the point in applying the material when you hide the object?
Ok, it's my bad : the FG I put here is not the FG I used, it showed the 2 options in the same picture. The first options is only with the Entity:Material and the second one is only with entity:GeomEntity.
Ok, I think I find where the problem is. It's like if the editor can't put different surface type to geomEntity if they are from the same cgf.
It's may hard to explain, so I made a video to expose it (40sec) :
As you can see, if I made 2 different cgf (in the left), I can have two different surface type. But in the right where there is only one cgf for both geomEntity, the surface type "ingame" is the last material loaded.
Connect and collaborate with CRYENGINE developers in the official Forums. Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
All rights reserved. Crytek, Crysis, Crysis Warhead, Crysis Wars and CRYENGINE® are registered trademarks
of Crytek in the EU, the USA & other countries. All other trademarks are property of their respective owners.