Can anybody tell me why this script, that was made by Lilacs doesn't work?
The script is named as is supposed to be named i_itemtag_aq... and as far a I know, this is all that's needed.Right?
void OnAcquire(object oEventItem, object oAcquiredBy, object oTakenFrom, int nStackSize)
{
object oPC = oAcquiredBy;
// Only fire for PCs.
if ( !GetIsPC(oPC) )
return;
// Only fire once per game.
if ( GetLocalInt(GetModule(), "DOONCE_OnAcquire_" + GetTag(oEventItem)) )
return;
SetLocalInt(GetModule(), "DOONCE_OnAcquire_" + GetTag(oEventItem), TRUE);
// Update the party's journals.
AddJournalQuestEntry("questtag", 21, oPC);
}
item on aquire script
Débuté par
andysks
, août 28 2013 02:49
#1
Posté 28 août 2013 - 02:49
#2
Posté 28 août 2013 - 03:51
The script needs a void main() function. Do you have that bit to post?
#3
Posté 28 août 2013 - 04:19
Um no, all there is to it is what you see here
void OnAcquire(object oEventItem, object oAcquiredBy, object oTakenFrom, int nStackSize)
Thats how it starts.
void OnAcquire(object oEventItem, object oAcquiredBy, object oTakenFrom, int nStackSize)
Thats how it starts.
#4
Posté 28 août 2013 - 06:12
The tag-based item scripts need a main function. Basically, you need to rename your single function to void main() (no arguments) and then define all the variables not listed out as parameters. Actually, just go into the toolset, create a new script using the item on-acquired template, and paste in your //only fire once per game section with the variable names fixed.
I don't know why Lilac's gave you the script it did, maybe someone with more experience with it can chime in.
I don't know why Lilac's gave you the script it did, maybe someone with more experience with it can chime in.
#5
Posté 28 août 2013 - 09:34
It worked now with the template
. Thanks a lot. Lilacs is great but I guess sometimes I have to try doing stuff on my own





Retour en haut






