#include "core_h"
object oMerchant = GetEventCreator(); [also tried oMerchant = OBJECT_SELF;]
object oStore = GetObjectByTag(GetTag(oMerchant)&"_st");
if(IsObjectValid(oStore))
{
ScaleStoreItems(oStore);
OpenStore(oStore);
}
else
{
Log_Trace(LOG_CHANNEL_SYSTEMS, GetCurrentScriptName(), "INVALID STORE OBJECT");
}
The store tag is the same as the merchant NPC's but with _st on the end. I'm guessing the geteventcreator function isn't getting the merchant connected to the relevant conversation but aren't sure. This is my first attempt at a script in DA - my only previous experience was with the nwn toolset - so I'm probably missing something obvious - for example is there an OBJECT_SELF option for objects, or some other way of getting a non-PC creature without needing the exact tag ref?
Also as a general question with the script editor, is there anyway to enable 'quick selection' of functions by typing in their name in the list? For example with nwn if I typed in GetT it'd bring up gettag. However with DA:O it only goes by the first letter so g brings up all of the G functions, without ever narrowing it down further, which makes it a real pain for getting functions.
Finally is there anywhere that provides various completed scripts? I tried dragon age nexus and the builder wiki but wasn't able to find anything obvious there
Modifié par maudlin27, 20 février 2010 - 11:21 .





Retour en haut






