zbyl2 Posted June 5, 2008 Share Posted June 5, 2008 Hello holowan! I have a problem, and I hope someone can help me . Is it possible to do that: In module there is corpse (as placeable), in corpse ithere s datapad. After I get datapad from corpse it adds new journal entry. I have no idea how do that. Can anyone help me? Link to comment Share on other sites More sharing options...
Darth InSidious Posted June 5, 2008 Share Posted June 5, 2008 You'd need to attach a script to one of the script slots on the .utp file for the corpse, with a script something like void main() { AddJournalQuestEntry("my_quest",40); } That, where my_quest is the tag and 40 is the entry number. I'd suggest attaching this to the OnDisturb slot. You'll also want to make sure it only fires once, so you should probably use a global boolean, like so: if(GetGlobalBoolean("blah") == TRUE) { SetGlobalBoolean("blah", FALSE); //Add your journal stuff here. } Where blah is the name of the global boolean in globalcat.2da . Overall, here's a suggested script for the OnDisturb slot: void main() { if(GetGlobalBoolean("blah") == TRUE) { SetGlobalBoolean("blah", FALSE); AddJournalQuestEntry("my_quest",40);. } } Link to comment Share on other sites More sharing options...
stoffe Posted June 5, 2008 Share Posted June 5, 2008 The easiest way of checking if an object has been removed from a container and then update the journal is probably to put a script in the OnInvDisturbed event slot of the container placeable. It triggers when the inventory of the container is modified. Like: void main() { if ((GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_REMOVED) && IsObjectPartyMember(GetLastDisturbed()) && (GetTag(GetInventoryDisturbItem()) == "[color="Yellow"]DatapadTag[/color]") && (GetJournalEntry("[color="Cyan"]my_quest[/color]") < [color="Red"]40[/color])) { AddJournalQuestEntry("[color="Cyan"]my_quest[/color]", [color="Red"]40[/color]); } } This script would update the quest stage journal entry of the quest my_quest to 40 if the item with the tag DatapadTag was taken from the container by a party member, and the quest hasn't already reached that stage (or a higher one). Link to comment Share on other sites More sharing options...
zbyl2 Posted June 5, 2008 Author Share Posted June 5, 2008 Thank you very much InSidious (and stoffe )! It works perfectly! Thank you again! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.