Page 1 of 1

polymorphing a opponent ?

PostPosted: Sun Jul 07, 2002 10:58 pm
Author: Random
What I am looking for is a script that i can put on a special weapon that will pollymorph the opponent into a pig.
A boar would do nicely

I would really like it On Crit instead of on hit

if i put it on hit I would just have to dramatically recuce the chance to activate.

Item is called pig sticker

I made in a high level module.
I am recreating that mage and his house is as addition to a module I and a few friends intend to work on.

PostPosted: Mon Jul 08, 2002 1:24 am
Author: Orleron
Scripting individual items is difficult I think because items themselves don't have scripts. Only placeable objects, areas, and modules do.

Soooo..... What you would have to do is the same thing the guy who made the Hard Core Rules Set did.... He put a statement in the modules OnHeartBeat script that checks every item being used in the game, and if that item is the one you have in mind, i.e. the sword, and that sword damages someone, then polymorph them via ApplyEffectToObject(duration type, oEffect, oTarget, duration).

PostPosted: Mon Jul 08, 2002 1:54 pm
Author: Random
is there a pollymorph other effect i game ?
al i have seen is pollymorph self

even then how would i make them into a pig ?


and is there a option to only have it work on a crit hit ?

PostPosted: Mon Jul 08, 2002 3:35 pm
Author: Orleron
You don't need to worry about whether it's polymorph self or polymorph other. All you need to do is assign the effect variable called eEffect to be a polymorph effect.

I don't remember the function off the top of my head but it would be something like:


effect eEffect = Effect(DURATION_TYPE_PERMANENT, EFFECT_TYPE_POLYMORPH_BOAR);
ApplyEffectToObject(oTarget, eEffect);


Checking for a critical hit is difficult too. I don't even know how you would test for that. Try asking the question on http://nwn.bioware.com/forums

PostPosted: Mon Jul 08, 2002 3:50 pm
Author: Random
asked here first because I have always respected you guys opinions much more than the peeps there :)