Author Topic: Need Two Persistence Functions  (Read 787 times)

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Need Two Persistence Functions
« Reply #30 on: August 10, 2012, 04:29:47 am »


               (slightly off-topic)

if it's any help, here's my PW "combo-tag" script for horse summons: __hi_ho_silver__.nss

(tag based scripting required, first 16 letters = script name, 17+ = resref data)

//__hi_ho_silver__.nss

#include "x2_inc_switches"
#include "x3_inc_horse"

void main()
{

   if (GetUserDefinedItemEventNumber() !=  X2_ITEM_EVENT_ACTIVATE) return;
   object oUser = GetItemActivator();
   if (HorseGetIsMounted(oUser)) return;
   object oItem = GetItemActivated();
   string sTag = GetTag(oItem);
   string sResRef = GetSubString(sTag,16,GetStringLength(sTag)-16);
   object oHorse = HorseGetHorse(oUser);
if (oHorse == OBJECT_INVALID) oHorse = GetLocalObject(oUser,"STEED");
DestroyObject(oHorse);
oHorse = HorseCreateHorse(sResRef,GetLocation(GetItemActivator()),oUser);
   SetLocalObject(oUser,"STEED", oHorse);

}


example tag: __hi_ho_silver__cep_black_horse
               
               

               


                     Modifié par Carcerian, 10 août 2012 - 04:18 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Need Two Persistence Functions
« Reply #31 on: August 10, 2012, 04:59:26 am »


               
Quote
Carcerian wrote...

(slightly off-topic)

Quote



Hek, the entire thread is off topic from the original post.  
An Edit of the title would not hurt for others finding this info with a fourn search.
'Posted
               
               

               
            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Need Two Persistence Functions
« Reply #32 on: August 10, 2012, 05:19:44 am »


               Any thread that spawns new ideas or examples is epic in my book...

(Personal Goal: learn something new everyday!)

':wizard:'
               
               

               


                     Modifié par Carcerian, 10 août 2012 - 04:21 .
                     
                  


            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Need Two Persistence Functions
« Reply #33 on: August 10, 2012, 08:37:06 am »


               To get back on topic, a read/write to pc_hide/inventory set of DB function scripts would be a great post for sure '<img'>
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Need Two Persistence Functions
« Reply #34 on: August 10, 2012, 03:04:44 pm »


                I looked again at the krit's version of x3_pc_skin and see no problem with it. On the vault it is called Remove PC Properties
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Two Persistence Functions
« Reply #35 on: August 10, 2012, 03:41:03 pm »


               

henesua wrote...

 I looked again at the krit's version of x3_pc_skin and see no problem with it. On the vault it is called Remove PC Properties


I've gone back to this system, now that I understand what I did wrong when merging my module events with the Krits. Working much smoother now.