Working on DSotSC and running into a bit of snag... thought I would seek some help in this matter.
I have a weapon that will change abilities whether it's day or night. So I have made two versions of the weapon.
I can get the weapon to change on the NPC, but he won't equip it. It's in his weapon slot but NOT in his hand.
Here is the script (I have appended this to baldur.bcs) ...using "weapon_d", "weapon_n" and "NPC" to avoid revealing spoilers. :)
IF
TimeOfDay(NIGHT)
HasItem("weapon_d","NPC")
THEN
RESPONSE #100
TakeItemReplace("weapon_d","weapon_n","NPC")
SetGlobal("WEAPON_SWAP","GLOBAL",1)
END
IF
TimeOfDay(DAY)
HasItem("weapon_n","NPC")
THEN
RESPONSE #100
TakeItemReplace("weapon_n","weapon_d","NPC")
SetGlobal("WEAPON_SWAP","GLOBAL",1)
END
.....This works so far! The part below, does not...
// Night Version Not Equiped
IF
ActionListEmpty()
HasItem("weapon_n","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
!HasItemEquipedReal("weapon_n","NPC")
THEN
RESPONSE #100
EquipItem("weapon_n","NPC")
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
// Night Version Equiped
IF
ActionListEmpty()
HasItem("weapon_n","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
HasItemEquiped("weapon_n","NPC")
THEN
RESPONSE #100
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
// Day Version Not Equiped
IF
ActionListEmpty()
HasItem("weapon_d","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
!HasItemEquipedReal("weapon_d","NPC")
THEN
RESPONSE #100
EquipItem("weapon_d","NPC")
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
// Day Version Equiped
IF
ActionListEmpty()
HasItem("weapon_d","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
HasItemEquiped("weapon_d","NPC")
THEN
RESPONSE #100
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
Any suggestions?
Thanks!
I have a weapon that will change abilities whether it's day or night. So I have made two versions of the weapon.
I can get the weapon to change on the NPC, but he won't equip it. It's in his weapon slot but NOT in his hand.
Here is the script (I have appended this to baldur.bcs) ...using "weapon_d", "weapon_n" and "NPC" to avoid revealing spoilers. :)
IF
TimeOfDay(NIGHT)
HasItem("weapon_d","NPC")
THEN
RESPONSE #100
TakeItemReplace("weapon_d","weapon_n","NPC")
SetGlobal("WEAPON_SWAP","GLOBAL",1)
END
IF
TimeOfDay(DAY)
HasItem("weapon_n","NPC")
THEN
RESPONSE #100
TakeItemReplace("weapon_n","weapon_d","NPC")
SetGlobal("WEAPON_SWAP","GLOBAL",1)
END
.....This works so far! The part below, does not...
// Night Version Not Equiped
IF
ActionListEmpty()
HasItem("weapon_n","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
!HasItemEquipedReal("weapon_n","NPC")
THEN
RESPONSE #100
EquipItem("weapon_n","NPC")
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
// Night Version Equiped
IF
ActionListEmpty()
HasItem("weapon_n","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
HasItemEquiped("weapon_n","NPC")
THEN
RESPONSE #100
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
// Day Version Not Equiped
IF
ActionListEmpty()
HasItem("weapon_d","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
!HasItemEquipedReal("weapon_d","NPC")
THEN
RESPONSE #100
EquipItem("weapon_d","NPC")
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
// Day Version Equiped
IF
ActionListEmpty()
HasItem("weapon_d","NPC")
Global("WEAPON_SWAP","GLOBAL",1)
HasItemEquiped("weapon_d","NPC")
THEN
RESPONSE #100
SelectWeaponAbility(SLOT_WEAPON,0)
SetGlobal("WEAPON_SWAP","GLOBAL",0)
END
Any suggestions?
Thanks!


.jpg)








