Obscure Query
Zephirius
Member Posts: 419
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.
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.
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.
0
Comments
Anyway, once activated, they stay that way until you call a script to deactivate them.
This function is used to have a player or henchman do things like unlock or use a placeable.
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)); }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.
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.
I wish I could just mail you the area .erf. Ha!