Server Totals
M'Chek - (1)
Wilderness - (1)
Ferrell - (0)
Elysia - (0)
Le'Or - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Mikona - (0)
Total players: 2
Gallery

Links Menu

Item OnHit:Cast Spells explanations

Moderators: Nighthawk4, Dungeon Masters

Item OnHit:Cast Spells explanations

PostAuthor: JollyOrc » Sat May 28, 2005 7:45 am

Hi,

Code: Select all
// the arrows this script is attached to will kill Monster X instantly.
// otherwise they are more or less useless.

#include "x2_inc_switches"

void main()
{
    int nEvent = GetUserDefinedItemEventNumber();

    if (nEvent ==  X2_ITEM_EVENT_ONHITCAST)
    {
        object oTarget = GetItemActivatedTarget();
        if (GetTag(oTarget)=="TagOfMonsterX")
            ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(0,TRUE),oTarget);
    }
}


assuming I got the tag based scripting part right, why isn't this working ?
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: Jonezie » Sat May 28, 2005 8:17 am

SHould be:

Code: Select all
object oTarget = GetSpellTargetObject();
User avatar
Jonezie
Team Member; Retired with Honors
 
Posts: 3906
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

PostAuthor: JollyOrc » Sat May 28, 2005 10:19 am

that works, thanks.
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: Jonezie » Sat May 28, 2005 10:23 am

:good:
User avatar
Jonezie
Team Member; Retired with Honors
 
Posts: 3906
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

PostAuthor: Chemical-Burn » Sat May 28, 2005 10:28 pm

Is that a recipe for turkey stuffing?

Chemical-Burn
Scholar
 
Posts: 1076
Joined: Mon Jun 07, 2004 11:42 am
Location: McMinnville, OR GMT-8 (-7)
Timezone: PST -8

PostAuthor: JollyOrc » Sat May 28, 2005 11:28 pm

no it's the essence of a new type of critters and weapons against them on Catara.

Where you've got to do some research before you can actually hurt some big nasty things.
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Blackravenfeather, Google [Bot], slow feet, Yahoo [Bot]