heyas;
so let's say i want to create a new item (tutorials abound), but i want it to be a gift, and i want different companions to have different opinions on said gift. can an item be created and imbued with gift-like properties defining all this, or is all that handled in scripting in the game engine itself?
How to Create a Gift Item?
Débuté par
BloodsongVengeance
, sept. 17 2010 04:56
#1
Posté 17 septembre 2010 - 04:56
#2
Posté 17 septembre 2010 - 06:18
You have to set the base item type of the gift to be Gift.
Other than this, all the approval/opinions/conversations related to gifts are done in scripts by handling the EVENT_TYPE_MODULE_HANDLE_GIFT event.
Other than this, all the approval/opinions/conversations related to gifts are done in scripts by handling the EVENT_TYPE_MODULE_HANDLE_GIFT event.
#3
Posté 18 septembre 2010 - 03:19
okay, so... i'm looking at this code under the gift event
sp_mod_item_acq script
so... my question is this: the approval change is sent to the gift event as an integer. WHERE is this approval change defined? i dont see any slot or variable indicating it would just be set on the gift item itself. :/
sp_mod_item_acq script
case EVENT_TYPE_MODULE_HANDLE_GIFT:
{
object oFollower = GetEventObject(evEvent, 0);
object oItem = GetEventObject(evEvent, 1);
string sGiftTag = GetTag(oItem);
int nApprovalChange = GetEventInteger(evEvent, 0);
//--now the wrong gift/refund handling code; not applicable to my situation
int nSoundSet;
if(nApprovalChange <= 0) nSoundSet = SS_GIFT_NEGATIVE;
else if(nApprovalChange > 0 && nApprovalChange <= 3) nSoundSet = SS_GIFT_NEUTRAL;
else if(nApprovalChange > 3 && nApprovalChange <= 8) nSoundSet = SS_GIFT_POSITIVE;
else nSoundSet = SS_GIFT_ECSTATIC;
if(GetTag(oFollower) == GEN_FL_DOG)
PlaySound(oFollower, "glo_dog/dog/ss/ss_dog_bark_excited");
if(!bRefunded)
{
int nFollower = Approval_GetFollowerIndex(oFollower);
Approval_ChangeApproval(nFollower, nApprovalChange);
PlaySoundSet(oFollower, nSoundSet);
WR_DestroyObject(oItem);
}
else
PlaySoundSet(oFollower, SS_BAD_IDEA);
//--then code for special gift cutscene sequences
}
so... my question is this: the approval change is sent to the gift event as an integer. WHERE is this approval change defined? i dont see any slot or variable indicating it would just be set on the gift item itself. :/





Retour en haut







