misterslack Posted June 22, 2008 Share Posted June 22, 2008 How do I select an item's particular ability for use in an AI script? For example, the Ring of Gaxx can cast both Improved Haste and Improved Invisibility, however UseItem("RING39", Myself) only uses the invisibility. I don't see any command in the IESDP and I cannot find an example script that does what I'm talking about. I tried SelectWeaponAbility and that didn't work. Any help would be greatly appreciated. Link to comment
cirerrek Posted June 23, 2008 Share Posted June 23, 2008 How do I select an item's particular ability for use in an AI script? For example, the Ring of Gaxx can cast both Improved Haste and Improved Invisibility, however UseItem("RING39", Myself) only uses the invisibility. I don't see any command in the IESDP and I cannot find an example script that does what I'm talking about. I tried SelectWeaponAbility and that didn't work. Any help would be greatly appreciated. I don't believe you can do it through scripting. At least, I've never been able to get it to work. Kensai Ryu had a lich script that supposedly did some fancy stuff with a staff of the magi, but I never saw it in action. Link to comment
igi Posted June 23, 2008 Share Posted June 23, 2008 34 UseItemSlot(O:Target*, I:Slot*) ? Link to comment
the bigg Posted June 23, 2008 Share Posted June 23, 2008 It only works for items with only one special ability. BTW, "allirpM".rev() did a "breakthrough discovery" in his s u p e r s c r i p t s, by emulating the various items' abilities with SpellNoDec. Link to comment
devSin Posted June 23, 2008 Share Posted June 23, 2008 34 UseItemSlot(O:Target*, I:Slot*) ?This is just I:Slot*SLOTS (so you can say "use the item in slot RING_LEFT" without knowing exactly what resref is in that slot). Link to comment
Razfallow Posted April 22, 2009 Share Posted April 22, 2009 Change UseItemSlot(O:Target*, I:Slot*) to UseItemSlot(O:Target*,I:Slot*SLOTS,I:AbilityNum*), and you could use all three item abilities in scripts. You still have to know in which slot the item is. Link to comment
Avenger Posted April 25, 2009 Share Posted April 25, 2009 Huh, i thought i had the bright idea to actually implement this in gemrb. I didn't know the original engine does it too On the other hand, UseItemSlot and UseItem share the SAME opcode. So, if the analogy works completely, then you could use this too 34 UseItem(S:Object*,O:Target*,I:Ability) See 97 UseItemPoint(S:Item,P:Target*,I:Ability*) Link to comment
Razfallow Posted April 25, 2009 Share Posted April 25, 2009 So, if the analogy works completely, then you could use this too34 UseItem(S:Object*,O:Target*,I:Ability) Tested, it doesn't work. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.