polymorphing a opponent ?

Moderator: Event DM

Post Reply
Random
Apprentice Scholar
Posts: 525
Joined: Sun Sep 30, 2001 10:22 pm
Location: Alabama
Contact:

polymorphing a opponent ?

Post by Random » Sun Jul 07, 2002 10:58 pm

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.
Orleron
World Advisor, Co-founder
World Advisor, Co-founder
Posts: 15149
Joined: Fri Sep 14, 2001 9:48 pm
Timezone: GMT-5
Contact:

Post by Orleron » Mon Jul 08, 2002 1:24 am

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).
"Truth has no form."
--Idries Shah
Random
Apprentice Scholar
Posts: 525
Joined: Sun Sep 30, 2001 10:22 pm
Location: Alabama
Contact:

Post by Random » Mon Jul 08, 2002 1:54 pm

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 ?
Orleron
World Advisor, Co-founder
World Advisor, Co-founder
Posts: 15149
Joined: Fri Sep 14, 2001 9:48 pm
Timezone: GMT-5
Contact:

Post by Orleron » Mon Jul 08, 2002 3:35 pm

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
"Truth has no form."
--Idries Shah
Random
Apprentice Scholar
Posts: 525
Joined: Sun Sep 30, 2001 10:22 pm
Location: Alabama
Contact:

Post by Random » Mon Jul 08, 2002 3:50 pm

asked here first because I have always respected you guys opinions much more than the peeps there :)
Post Reply