Aller au contenu

Adding an NPC to an specific area.


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
Hello everyone!!!
Well the thing is that i want to add a custom NPC to the Single Player Camp, but i have tried a lot of scripts and i dont get it to work.
I need him to be added to the party camp after i spoke with him, how can i do this? please help me :)

regards,Image IPB

#2
ladydesire

ladydesire
  • Members
  • 1 928 messages
Insert content into an existing area; I've used this to add a new companion to Lothering. I'm getting ready to add her to the party camp as well.

#3
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
Thank you, i've sent you a pm asking you for further help, but is there anyone that can please explain me more, because that script that you are saying thare is the one i cant get to work. thanks to everyone, and please help me :)

#4
ladydesire

ladydesire
  • Members
  • 1 928 messages
You need a 2da file with the following in it (file should be named PRCSCR_prc_lealion or similar):

ID	AreaListName	Script
int	string	string
10100001	cam100ar_camp_plains	prc_lealion_camp_spawn
10100002	lot100ar_lothering	prc_lealion_spawn



Then your script (prc_lealion_spawn in the above example) should look something like this (or the one on the wiki):



//const string TAL_STORAGE_CHEST_SPAWNED = "TAL_STORAGE_CHEST_SPAWNED";
const string TAL_IP_STORAGE_CHEST = "Lealion";
const resource TAL_RESOURCE_IP_STORAGE_CHEST = R"gen00fl_lealion.utc";

void main()
{
    object oMainControlled = GetMainControlled();
    object oChest = UT_GetNearestObjectByTag(oMainControlled, TAL_IP_STORAGE_CHEST);


    //DisplayFloatyMessage(oMainControlled, "storage script working", FLOATY_MESSAGE, 16777215, 30.0);

    if (!IsObjectValid(oChest))
    {
        location lSpawn = Location(GetArea(oMainControlled), Vector(322.119, 205.034, 1.22193), 0.0);
        CreateObject(OBJECT_TYPE_CREATURE, TAL_RESOURCE_IP_STORAGE_CHEST, lSpawn);

        //DisplayFloatyMessage(oMainControlled, "storage chest created", FLOATY_MESSAGE, 16777215, 30.0);
    }
}


#5
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
Thanks, i have to try this. :D