Blue Abstract created by SyringeX of the IF Skin Zone


 

 Body Exchange, Quest concerned
Shadow69
Posted: Nov 16 2006, 12:25 PM


The Shadow Knows


Group: Catch 22 Designs Team
Posts: 15
Member No.: 5
Joined: 27-September 06



Is it possible to turn a character(not the player controlled) into another character instantly. But the character has to have one item of clothing stay the same, the hat.

It would be great if it doesn't require some fancy lights or smoke or something.


--------------------
Shadow69
ETS - Co-Writer & Co-Producer
Catch 22 Designs Team
Top
Schee
Posted: Nov 16 2006, 04:35 PM


Advanced Member


Group: Members
Posts: 34
Member No.: 2
Joined: 16-September 06



Let's see if I got it right. You want an effect that instantly changes the apperance of a NPC into that of that of another NPC? But one that still has at least some of the same gear? Short answer is yes, it can be done. But is it just the apperance that should be changed or also class and skills and such?

If its only the apperance there is one really easy way to do it, but only if the NPCs are of the same gender. You can set the head and clothes (except the hat in this case) to be the same as the other NPC, so they will look identical. I don't think there is a set gender function though, so it would not work cross gender. There is a polymorph type called NULL_HUMAN, that might work but I havn't really looked into it.

If class level and skill should adapt to it becomes alot harder to actually transform the NPC. You should technicaly be able to do it by deleveling the NPC and leveling him up again. But it would probably be hard to do. Easier would simply be to destroy the NPC and create a new one in its place (or just hiding the first character to be able to recreate it exactly later). It would take some creative use of invisibility teleports and such to make the change look seemless, otherwise the first NPC would fade and the otherone appear beside it. But once it is done it should look like in instand change.


In fact the last option is probably how I would do it since it can handle cross gender change and change the class of the NPC. Also, once the script is created you could easily apply it to any NPC and change it into any creature you want, or add visual effects if you later wanted that.


If you tell me if its just apperance or the works that you are intressted in I could take a look at it.
Top
Shadow69
Posted: Nov 17 2006, 12:35 AM


The Shadow Knows


Group: Catch 22 Designs Team
Posts: 15
Member No.: 5
Joined: 27-September 06



It only has to change the appearance. Not the class or gender. It can even as you say kill the old NPC and replace it with a new one. Just so it looks like the person magically changed appearances.

You saying you can't make the hat stay the same or what?


--------------------
Shadow69
ETS - Co-Writer & Co-Producer
Catch 22 Designs Team
Top
Schee
Posted: Nov 17 2006, 08:55 AM


Advanced Member


Group: Members
Posts: 34
Member No.: 2
Joined: 16-September 06



Equipment is not a problem, its just to equip it to the new person tongue.gif
As long as it is real equipment that is and not part of the head as some CEP models have it.

To set the head to the desired one you would use:
SetCreatureBodyPart(CREATURE_PART_HEAD,HeadNumber,oNPC);

Where HeadNumber is the number of the head you are after. If you want to copy an already existing NPC then you can use the following function to find the right head.
GetCreatureBodyPart(CREATURE_PART_HEAD,oTarget);

If you aready know what head you are after you can go into the editor and create a blank human, then look for the head you want and take its number. If you want the first head named pMH_HEAD001, then you want the number 1 in the HeadNumber spot above.

You can change any body part in this manner. Above oNPC is the one you want to change, and oTarget is the one you want to copy if doing it that way.


So, to copy an already existing npc: (Only changes head, but you can change other body parts if needed).
CODE
void main()
{
   //Get the NPC to change and the one to copy.
   object oNPC = GetObjectByTag("TheNPCToChange");
   object oTarget = GetObjectByTag("TheNPCToCopy"):

   //Get the apperance of the one you want to copy, and set it to the new changing NPC
   int iPart = GetCreatureBodyPart(CREATURE_PART_HEAD,oTarget);
   SetCreatureBodyPart(CREATURE_PART_HEAD,iPart,oNPC);
}


To set it to body part you know the number of:
CODE
void main()
{
   //Get the NPC to change
   object oNPC = GetObjectByTag("TheNPCToChange");

   //Set the apperance
   SetCreatureBodyPart(CREATURE_PART_HEAD,HeadNumber,oNPC);
}




I could write the exact script if I knew what you wanted to do tongue.gif
Top
Shadow69
Posted: Nov 17 2006, 11:53 AM


The Shadow Knows


Group: Catch 22 Designs Team
Posts: 15
Member No.: 5
Joined: 27-September 06



Okay this is the basic thing. The quest consists of the main character to acquire a hat for our NPC. Once the NPC gets the hat, he puts it on and the hat changes his appearance. He changes completely, but the hat remains.

Thanks for all you've written. I'm glad it can be done. Now, to write the quest dialogue and everything.


--------------------
Shadow69
ETS - Co-Writer & Co-Producer
Catch 22 Designs Team
Top
BlueKnightOne
Posted: Nov 28 2006, 05:24 PM


Can't Stop the Signal


Group: Admin
Posts: 86
Member No.: 1
Joined: 15-September 06



Wouldn't it be easier to just create two versions of the NPC, one with the hat and changed but with the same name (not tag) and the other without, and then just write a script to switch them?


--------------------
BlueKnightOne
ETS - Project Lead
Catch 22 Designs Team
Top
Shadow69
Posted: Nov 29 2006, 05:51 AM


The Shadow Knows


Group: Catch 22 Designs Team
Posts: 15
Member No.: 5
Joined: 27-September 06



Don't ask me, I've never even played the game. And I know nothing about scripting. The only scripting I've done was a bit of Qbasic and I probably forgot everything.


--------------------
Shadow69
ETS - Co-Writer & Co-Producer
Catch 22 Designs Team
Top
Schee
Posted: Nov 29 2006, 06:56 AM


Advanced Member


Group: Members
Posts: 34
Member No.: 2
Joined: 16-September 06



QUOTE
Wouldn't it be easier to just create two versions of the NPC, one with the hat and changed but with the same name (not tag) and the other without, and then just write a script to switch them?

It would be, but it would not look as good. When you destroy a creature it fades out, it does not instantly dissaperer. So you would get the new verision jumping in beside the old verision, and the old verision fading out. If you actually change the NPC directly you don't get this effect.
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


Topic Options



Skin created by SyringeX of the IFSkinZone

Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.2301 seconds | Archive