I have a duplicate of Meridia's Beacon I'm using as a test object. I added a script to go off when I drop it.
Scriptname dpv_test_levitator extends ReferenceAliasimport debug;; make items float when dropped;float Property height Autofloat Property speed Autoevent OnContainerChanged(objectReference newref, objectReference oldref) objectReference ref = getReference() if newref != none trace("DPV: picked up " + ref) gotostate("held") else trace("DPV: dropped " + ref) gotostate("dropped") endifendeventstate heldendstatestate dropped ; need to make sure the object's 3D is loaded after being dropped event OnLoad() objectReference ref = getReference() trace("DPV: loaded " + ref) float x = ref.GetPositionX() float y = ref.GetPositionY() float z = ref.GetPositionZ() ref.translateTo(x, y, z + 1000, 180, 0, 0, speed) trace("DPV: translating " + ref) endeventendstateDoesn't work. I know it gets called when it should, and the translateTo code is executed. Just nothing moves.
So I thought maybe it only works on statics and the like. So I created a movable static version. Stuck that on a table next to a button and gave the button a script to float the gem.
Scriptname dpv_test_lev_button extends ObjectReferenceObjectReference Property Gem Autoevent OnActivate(objectreference foo) float x = GetPositionX() float y = GetPositionY() float z = GetPositionZ() translateTo(x, y, z + 1000, 180, 0, 0, 100)endeventOf course that script http://imgur.com/2ny0EEP,uZ5vSSF,2lFK1No#0 rather than the gem. Still at least I know my code works, right?
Except when I point it back at the gem, nothing happens again.
Any ideas, people? This is rapidly losing its amusemant value
[edit]
It's something about the mesh. If I copy the button and set it to levitate itself, the button levitates. If I change the mesh so it looks like the gem, changing nothing else, then the levitation no longer happens.
What am I missing?