Statue In A Pose

Moderator: Event DM

Post Reply
User avatar
Sili
Sage
Posts: 1816
Joined: Thu Oct 24, 2002 6:24 pm
Location: dallas, tx, GMT -5/-6?!!!
Contact:

Statue In A Pose

Post by 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
Actually
Sage
Posts: 1823
Joined: Sat Dec 14, 2002 10:11 pm
Location: Red Zone: Cuba

Post by 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
User avatar
Neve
Prince of Bloated Discourse
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands
Contact:

Post by 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
Sili
Sage
Posts: 1816
Joined: Thu Oct 24, 2002 6:24 pm
Location: dallas, tx, GMT -5/-6?!!!
Contact:

Post by 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
JollyOrc
Elder Sage
Posts: 3984
Joined: Fri Jan 17, 2003 11:41 am
Timezone: Europe, CE(S)T
Location: Germany
Contact:

Post by 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
Elder Sage
Posts: 3984
Joined: Fri Jan 17, 2003 11:41 am
Timezone: Europe, CE(S)T
Location: Germany
Contact:

Post by 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
Neve
Prince of Bloated Discourse
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands
Contact:

Post by 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.
Post Reply