About Store Forum Documentation Contact



Post Reply 
Replace skeleton ingame
Author Message
Dynad Offline
Member

Post: #1
Replace skeleton ingame
Hey,

I have a problem with Mesh+skeleton reassigning ingame.

I want to change the current mesh and skeleton to another mesh and skeleton without deleting any objects from the container.

- I have created 1 player (Main Player)
- Then i want to change the mesh and skeleton like changing in something else.
- I can change the Mesh but the skeleton isn't right...

But this aint working...
PHP Code:
Skeleton *t;
Skeletons("Obj/chr/human2/0.skel");
owner.cskel.del();
owner.cskel.create(*t); 

Thnx,
~Dynad

There is always evil somewhere, you just have to look for it properly.
06-21-2010 08:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Replace skeleton ingame
for this case you should create new Game::Chr object, and delete the old one.
06-21-2010 08:24 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: Replace skeleton ingame
Well thats not very nice way todo this tho;

Like in WoW u can sheep a character and after a few seconds it comes back to its original character...

Your way is to delete and create every time a player when u need to change a mesh isn't that kinda strange??

And your attributes like health; how do i gonna keep that when you delete the player?? i dont know about this..

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 06-21-2010 08:31 PM by Dynad.)
06-21-2010 08:29 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Replace skeleton ingame
this is required because how Game::Chr is implemented, unless you can access the sources of Game::Chr, you must create/delete objects

to copy parameters you can

new obj=objcreate();
new obj.health=old obj.health;
remove old obj;
06-21-2010 08:39 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #5
RE: Replace skeleton ingame
1: Is it also possible to give the new created object the same orientation as the old object, that the player wont notice any difference in movement/orientation etc.

2: When u walk or any action and you delete the object and create a new 1 does the walking animation stop? and some kind of client lag "warping"?
Btw and when u delete the character u loose the item inventory aswell..

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 06-21-2010 10:18 PM by Dynad.)
06-21-2010 09:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply