Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Obscure Query

ZephiriusZephirius Member Posts: 156
There is a crystal placeable that when you click on it little "floaties" go upward.
I tried scripting the placeable to activate but can't get the "floaties" to activate.
DoPlaceableObjectAction(OBJECT_SELF, ANIMATION_PLACEABLE_ACTIVATE));

The only reservation about this is: it's on the OnHeartbeat handler and I'm uncertain how the animation will react to being played every six seconds.

Comments

  • ForSeriousForSerious Member Posts: 197
    For all the placeables I have used, I get them to animate using
    ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
    
    Some are backwards, so you have to deactivate them to get them to animate.
    Anyway, once activated, they stay that way until you call a script to deactivate them.
    DoPlaceableObjectAction(oNPC, PLACEABLE_ACTION_*));
    
    This function is used to have a player or henchman do things like unlock or use a placeable.

  • ProlericProleric Member Posts: 845
    Some placeables also have open/close animations which are different. I don't know which crystal we're talking about, but it sounds like it could be an open animation, which you can play with the same function and the appropriate constant.

  • ZephiriusZephirius Member Posts: 156
    OK. thanks guys. Will give it a try. :)

  • ZephiriusZephirius Member Posts: 156
    ForSerious wrote: »
    For all the placeables I have used, I get them to animate using
    ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
    
    Some are backwards, so you have to deactivate them to get them to animate.
    Anyway, once activated, they stay that way until you call a script to deactivate them.

    Yes sir. That did the trick. It was ActionPlayAnimation...

  • ZephiriusZephirius Member Posts: 156
    edited June 11
    Hmm, I works sort of. I seems that the farther away from where I spawn, the crystals stop playing their "floaty" animation. This is strange. Any interesting theories?

    Script so far...
    void main()
    {
    
    int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
    if (DoOnce==TRUE) return;
    SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
    
    effect eGlow  = EffectVisualEffect(VFX_DUR_AURA_WHITE);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGlow, OBJECT_SELF);
    
    effect eIceskin = EffectVisualEffect(VFX_DUR_ICESKIN);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eIceskin, OBJECT_SELF);
    
    AssignCommand(OBJECT_SELF, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 1.5f, 6.0f));
    
    }
    

  • ForSeriousForSerious Member Posts: 197
    Not strange at all. You are telling it to activate for only 6 seconds. Using the default of 0.0f will make it play until you make it play the deactivate animation.

  • ZephiriusZephirius Member Posts: 156
    Same thing. I think I originally changed it from 0.0 to 6.0 in the hope that something would stick.
    The crystals are dispersed intermittently throughout the map, but the farther I get from the start, they just stop playing their animations.

    Thanks for the reply Serious.

  • ForSeriousForSerious Member Posts: 197
    Did you try it without the two other visual effects? If it's the same crystal I'm thinking of, it glows white when activated. I also tried to change the animation speed, but it was the same, no matter what I set it to.

  • ForSeriousForSerious Member Posts: 197
    edited June 11
    How are you calling this script? I tried it in the OnUsed slot. It works just fine. You can strip it down to:
    void main()
    {
        int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
        if(DoOnce==TRUE)
        {
            return;
        }
        SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
        effect eGlow  = EffectVisualEffect(VFX_DUR_AURA_WHITE);
        ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGlow, OBJECT_SELF);
        effect eIceskin = EffectVisualEffect(VFX_DUR_ICESKIN);
        ApplyEffectToObject(DURATION_TYPE_PERMANENT, eIceskin, OBJECT_SELF);
        ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
    }
    
    and it will work the exact same. I guess speed and duration don't affect placable animations.

    Unless you're going to deactivate the crystal at some point, you can just set the state to activated in the toolset. I guess you lose the other effects that way.

    Man I'm all out of ideas. I put your script in OnHeartbeat in about 15 crystals and they all activate and stay that way.

  • ZephiriusZephirius Member Posts: 156
    edited June 11
    Thanks for the help again. I'll eventually figure it out. I'm actually obsessing over this little bugger.
    I wish I could just mail you the area .erf. Ha!

Sign In or Register to comment.