EffectPolymorph(int)
Create a Polymorph effect that changes the target into a different type of creature.
effect EffectPolymorph( int nPolymorphSelection );
Parameters
nPolymorphSelection
Description
Returns a new effect object that when applied to a target will transform them into one of the types defined in the POLYMORPH_TYPE_* constant group.
Remarks
Constructors are special methods that return a new instance of an object. In NWN Script each effect that you can place on an object has it’s own constructor that creates a new instance of the specified effect. This effect object can then be used in an ApplyEffectToObject() Command. See Effect Constructor for more details.
With Shadows of Undrentide, there are three polymorph types available that you wouldn't know about because they're not added as constants. If you look in the polymorph.2da file, you'll see these three polymorph types:
43 POLYMORPH_TYPE_HEURODIS
44 POLYMORPH_TYPE_JNAH_GIANT_MALE
45 POLYMORPH_TYPE_JNAH_GIANT_FEMALE
As I said, they're not constants, meaning they're not defined in nwscript.nss. Keep in mind that all the POLYMORPH_TYPE_* constants are actually integers, pointing to rownumbers in the polymorph.2da file, though. So while you can't call EffectPolymorph(POLYMORPH_TYPE_HEURODIS), you CAN call EffectPolymorph(43) and get the desired result.
Known Bugs
Not really a bug, just an annoying little thing about EffectPolymorph: Players will always be able to cancel a polymorph effect using the button on their radial menu. You can do workarounds like a heartbeat that reapplies the polymorph if it isn't there, of course. Of course, most players don't know that that button is actually there, so it might not be a big problem (though I suppose after me writing this here, quite a few more players will know :P )
Version
1.30
See Also
categories: | Effects Functions | Spells Functions |
constants: | POLYMORPH_TYPE_* Constants |
author: John Shuell, editor: Lilac Soul, additional contributor(s): Lilac Soul
Send comments on this topic.