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

Links Menu

Statue In A Pose

Moderators: Nighthawk4, Dungeon Masters

Statue In A Pose

PostAuthor: Sili » Tue Nov 11, 2003 8:34 pm

Code: Select all
void main()
{
    object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
    SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
    ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT);
    object oTarget;
    oTarget = OBJECT_SELF;
    DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPetrify(), oTarget));
    SetPlotFlag(OBJECT_SELF, TRUE);
}


for some reason this won't fire. the fomating is messed up here. Called from OnSpawn
grunt_work: and lycans are just furries with an attack bonus
User avatar
Sili
Gold Contributor
 
Posts: 1816
Joined: Thu Oct 24, 2002 6:24 pm
Location: dallas, tx, GMT -5/-6?!!!

PostAuthor: Actually » Tue Nov 11, 2003 8:48 pm

The whole thing doesn't fire, or just the EffectPetrify()?

And this is a piddly point, but why are you declaring and assigning your oTarget on two different lines? Why not:

object oTarget = OBJECT_SELF;

Bye Now,
Jerry Cornelius - Script Monkey

Actually
Sage
 
Posts: 1823
Joined: Sat Dec 14, 2002 10:11 pm
Location: Red Zone: Cuba

PostAuthor: Neve » Tue Nov 11, 2003 8:52 pm

I tried a similiar thing, but the NPC will only play the animation at the time you're near it. If you leave the area and re-enter it, the statue will be standing in default pose again :?

[edit]

What exactly should the script do ? With your code you are trying to petrify the nearest player to the spawning player, is that what it needs to do ? Also, you did define an object oPC, and assigned an object to it, but it isn't used in the rest of the code...
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands

PostAuthor: Sili » Tue Nov 11, 2003 9:01 pm

Ok got the petrify to work. I want the creature this is attatched to, to stay in the taunt pose. The creature doens't even do the taunt

Code: Select all
void main()
{
    object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
    SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
    ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT);
    object oTarget;
    oTarget = OBJECT_SELF;
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PETRIFY), OBJECT_SELF);
    SetPlotFlag(OBJECT_SELF, TRUE);
}
Last edited by Sili on Tue Nov 11, 2003 9:05 pm, edited 1 time in total.
grunt_work: and lycans are just furries with an attack bonus
User avatar
Sili
Gold Contributor
 
Posts: 1816
Joined: Thu Oct 24, 2002 6:24 pm
Location: dallas, tx, GMT -5/-6?!!!

PostAuthor: JollyOrc » Tue Nov 11, 2003 9:02 pm

I'm not sure, but is EffectPetrify() a valid effect ?

Otherwise I agree with Neve and Actually:

Code: Select all
void main {
    object oTarget = OBJECT_SELF;
    ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT);
    DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPetrify(), oTarget));
    SetPlotFlag(OBJECT_SELF, TRUE);
}


should suffice. The rest seems ballast.

Dunno if this works as intended in the end, as I don't know if this will actually freeze the animation. Can't test it right now.
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: JollyOrc » Tue Nov 11, 2003 9:03 pm

uhm... off the top of my head:

perhaps AssignCommand() (or whatever it's called) should do the trick ?
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: Neve » Tue Nov 11, 2003 9:37 pm

You got it right there Jolly ;)

Code: Select all
void main { 
    AssignCommand(OBJECT_SELF, ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT));
    DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPetrify(), OBJECT_SELF));
    SetPlotFlag(OBJECT_SELF, TRUE);
}
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Frannie Mouze, galen_macbyrne