I was wondering if it was possible to give a DS or LS point for getting a specific item, if it is can somebody help me with doing that?
Hmm. You mean when you pick something up? Or if someone gives it to you? The items themselves can't do that, but the way you acquire them, it may be possible to do an alignment shift.
If it's someone giving you the item (i.e., you get it as a result of a dialogue or cutscene), it would be fairly easy to add an alignment shift script to the dialogue that gives you the item, and perhaps say that the item caused the alignment shift, even though technically it didn't.
I'm not sure it's possible to get an alignment shift if you randomly pick up an item, although if the item is in a unique container all the time, it should be possible to add a script to the container that would shift your alignment for opening it, and then you could just say the shift was caused by the contents. Check the scripts for creating items in containers, they should help.
Any specific item you had in mind?
Actually it was an item the I had created and it is in a unique container, so I guess I will have to look up a script to do an alignment shift and attach it to the container, but thanks for your help anyway.
Actually it was an item the I had created and it is in a unique container, so I guess I will have to look up a script to do an alignment shift and attach it to the container, but thanks for your help anyway.
You could add a script to the OnInvDisturbed event script slot of the container placeable holding the item which checks if an item was taken and if it was your particular item. Here is an example script:
void main() {
if (!GetLocalBoolean(OBJECT_SELF, 140)
&& (GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_REMOVED)
&& (GetTag(GetInventoryDisturbItem()) == "st_testitem")
&& IsObjectPartyMember(GetLastDisturbed()))
{
AdjustAlignment(GetFirstPC(), ALIGNMENT_DARK_SIDE, 5);
SetLocalBoolean(OBJECT_SELF, 140, TRUE);
}
}
This would give the main character a 5 point Darkside adjustment, once, if a party member picks up an item with the tag st_testitem from the container the script is attached to. :D
I don't even know what to say your amazing, thanks.
One question, how would I add an item to that script that would give me a LS point?
One question, how would I add an item to that script that would give me a LS point?
Change ALIGNMENT_DARK_SIDE to ALIGNMENT_LIGHT_SIDE
I actually wanted to add two items to that script a darkside item and a light side item.
One question, how would I add an item to that script that would give me a LS point?
Here's a variant using two items. The item with the tag "st_darkitem" gives a darkside adjustment when taken. while the item with the tag "st_lightitem" gives a lightside adjustment. Otherwise the script works like the previous example.
void main() {
if ((GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_REMOVED)
&& IsObjectPartyMember(GetLastDisturbed()))
{
string sTag = GetTag(GetInventoryDisturbItem());
if (!GetLocalBoolean(OBJECT_SELF, 140) && (sTag == "st_darkitem")) {
AdjustAlignment(GetFirstPC(), ALIGNMENT_DARK_SIDE, 5);
SetLocalBoolean(OBJECT_SELF, 140, TRUE);
}
else if (!GetLocalBoolean(OBJECT_SELF, 141) && (sTag == "st_lightitem")) {
AdjustAlignment(GetFirstPC(), ALIGNMENT_LIGHT_SIDE, 5);
SetLocalBoolean(OBJECT_SELF, 141, TRUE);
}
}
}
Thank you again that was exactly what I needed.