Hi,
How can I change the mesh of a loaded meshobj? If I remove the factory for the
meshobj it still exists. If I replace the factory and reload the scene then
the meshobj's factory has changed.
How can I do this realtime? (Full explanation below)
I've got a mesh loaded inside a world file
<sector name="Scene">
....
<meshobj name="speeder">
<plugin>genmesh</plugin>
<params>
<factory>craft</factory>
<material>cube2_copy10_auv2speeder.png.001</material>
</params>
<zuse/>
<move>
<v y="0.634025335312" x="-10.5805015564" z="-2.35899448395"/>
<matrix>
<roty>-1.57079632679</roty>
</matrix>
</move>
</meshobj>
</sector>
<sequences>
...
<sequence name="ObIpo.079speeder">
<delay time="41.6666666667"/>
<rotate duration="2083.33333333" mesh="speeder">
<roty>-3.14159265359</roty>
<v y="0.634025335312" x="-10.5805015564" z="-2.35899448395"/>
</rotate>
<delay time="2083.33333333"/>
<rotate duration="2083.33333333" mesh="speeder">
<roty>-3.14152973641</roty>
<v y="0.634025335312" x="-10.5805015564" z="-2.35899448395"/>
</rotate>
<delay time="2083.33333333"/>
<enable trigger="ObIpo.079speeder_t"/>
</sequence>
</sequences>
And this animated meshobj is then assigned to an entity in entities_world
<?xml version="1.0" encoding="UTF-8"?>
<world>
<sector name="Scene">
...
<addon entityname="speeder" plugin="cel.addons.celentity">
<propclass name="pcmesh">
<action name="SetMesh">
<par string="speeder" name="name"/>
</action>
</propclass>
</addon>
</sector>
</world>
Which is loaded with level.xml
<?xml version="1.0" encoding="UTF-8"?>
<level name="game_level">
<region name="asdf">
<map name="world" file="world"/>
<map name="entities_world" file="entities_world"/>
</region>
<zone name="start">
<region>asdf</region>
</zone>
<start>
<region>asdf</region>
<name>Camera</name>
</start>
</level>
I then load this region using ZoneManager.
Tried lots of things to change the mesh from CS code and changing the mesh of
the entity:
<lvar name="propclas" value="pc(ent(speeder),pcmesh)" />
<!--<action propclass="#propclas" id="actid(LoadMeshPath)">
<par id="parid(path)" value="'/xd/models/l'" />
<par id="parid(filename)" value="brandano" />
<par id="parid(factoryname)" value="craft" />
</action>-->
<!--<action propclass="#propclas" id="actid(LoadMesh)">
<par id="parid(filename)" value="'/xd/models/brandano'" />
<par id="parid(factoryname)" value="craft" />
</action>-->
I also need to keep that sequence on the mesh, and would like the old factory
cleared when I load the new one. Any directions on what I can do? Thanks.
Amir Taaki
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]