Hi!
What is wrong with this COG:
, these keys:
WheelDown.key
WheelRun.key
WheelUp.key
and this template:
What happens is:
When I activate pad (or left or right), the wheels... I don't know how they come down because they are under at least 3 floors, but when I go down to them, they aren't moving in a circle around Y! They move 25° on Z and 10° on X, then snap back to original position in a loop like that! Then when I press the pad again, they have stopped rotating but haven't gone back up!
HELP!
/Edward
What is wrong with this COG:
Code:
# Wheel Drop # # By Edward symbols message activated thing pan thing left thing right sound pull sound push thing wheel0 thing wheel1 thing wheel2 thing wheel3 thing wheel4 thing wheel5 thing wheel6 thing wheel7 keyframe movedown keyframe roll keyframe moveup sound move sound start sound run int k0=-1 local int k1=-1 local int k2=-1 local int k3=-1 local int k4=-1 local int k5=-1 local int k6=-1 local int k7=-1 local int i=0 local int z=0 local int c0 local int c1 local int c2 local int c3 local int c4 local int c5 local int c6 local int c7 local end # code activated: If(GetSenderRef()==pan || GetSenderRef()==left || GetSenderRef()==right) { If(i==0) { i=2; PlaySoundThing(pull,pan,1,-1,25,0xC0); MoveToFrame(left,1,1); MoveToFrame(right,1,1); WaitForStop(right); for(z=0; z<8; z=z+1) { k0[z]=PlayKey(wheel0[z],movedown,1,0x004); PlaySoundThing(move,wheel0[z],1,-1,10,0xC0); PlaySoundThing(start,wheel0[z],1,-1,50,0xC0); } sleep(GetKeyLen(movedown)); for(z=0; z<8; z=z+1) { c0[z]=PlaySoundThing(run,wheel0[z],1,-1,50,0xC1); StopKey(wheel0[z],k0[z],0.1); k0[z]=PlayKey(wheel0[z],run,1,0x000); } i=1; } else if(i==1) { i=2; PlaySoundThing(push,pan,1,-1,25,0xC0); MoveToFrame(left,0,1); MoveToFrame(right,0,1); WaitForStop(right); for(z=0; z<8; z=z+1) { StopKey(wheel0[z],k0[z],0.1); ChangeSoundPitch(c0[z],0.1,GetKeyLen(movedown)); StopSound(c0[z],GetKeyLen(movedown)); k0[z]=PlayKey(wheel0[z],moveup,1,0x004); PlaySoundThing(move,wheel0[z],1,-1,10,0xC0); } sleep(GetKeyLen(movedown)); for(z=0; z<8; z=z+1) { StopKey(wheel0[z],k0[z],0.1); } i=0; } } return; end
, these keys:
WheelDown.key
Code:
# KEYFRAME WheelDown.key created by Puppet Jedi 0.6 ############### SECTION: HEADER FLAGS 0x0000 TYPE 0xFFFF FRAMES 161 FPS 16 JOINTS 1 ############### SECTION: KEYFRAME NODES NODES 1 NODE 0 MESH NAME OBJECT01 ENTRIES 21 # num: frame: flags: x: y: z: p: y: r: # dx: dy: dz: dp: dy: dr: 0: 0 0x0003 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -0.00125000 0.00000000 0.00000000 0.12500000 1: 8 0x0003 0.00000000 0.00000000 -0.01000000 0.00000000 0.00000000 1.00000000 0.00000000 0.00000000 -0.00250000 0.00000000 0.00000000 0.25000000 2: 16 0x0003 0.00000000 0.00000000 -0.03000000 0.00000000 0.00000000 3.00000000 0.00000000 0.00000000 -0.00375000 0.00000000 0.00000000 0.37500000 3: 24 0x0003 0.00000000 0.00000000 -0.06000000 0.00000000 0.00000000 6.00000000 0.00000000 0.00000000 -0.00500000 0.00000000 0.00000000 0.50000000 4: 32 0x0003 0.00000000 0.00000000 -0.10000000 0.00000000 0.00000000 10.00000000 0.00000000 0.00000000 -0.00625000 0.00000000 0.00000000 0.62500000 5: 40 0x0003 0.00000000 0.00000000 -0.15000000 0.00000000 0.00000000 15.00000000 0.00000000 0.00000000 -0.00750000 0.00000000 0.00000000 0.75000000 6: 48 0x0003 0.00000000 0.00000000 -0.21000000 0.00000000 0.00000000 21.00000000 0.00000000 0.00000000 -0.00625000 0.00000000 0.00000000 0.87500000 7: 56 0x0003 0.00000000 0.00000000 -0.26000000 0.00000000 0.00000000 28.00000000 0.00000000 0.00000000 -0.00500000 0.00000000 0.00000000 1.00000000 8: 64 0x0003 0.00000000 0.00000000 -0.30000000 0.00000000 0.00000000 36.00000000 0.00000000 0.00000000 -0.00375000 0.00000000 0.00000000 1.12500000 9: 72 0x0003 0.00000000 0.00000000 -0.33000000 0.00000000 0.00000000 45.00000000 0.00000000 0.00000000 -0.00250000 0.00000000 0.00000000 1.25000000 10: 80 0x0003 0.00000000 0.00000000 -0.35000000 0.00000000 0.00000000 55.00000000 0.00000000 0.00000000 -0.00250000 0.00000000 0.00000000 1.37500000 11: 88 0x0003 0.00000000 0.00000000 -0.37000000 0.00000000 0.00000000 66.00000000 0.00000000 0.00000000 -0.00250000 0.00000000 0.00000000 1.50000000 12: 96 0x0003 0.00000000 0.00000000 -0.39000000 0.00000000 0.00000000 78.00000000 0.00000000 0.00000000 -0.00125000 0.00000000 0.00000000 1.62500000 13: 104 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 91.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.75000000 14: 112 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 105.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.87500000 15: 120 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 120.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 2.00000000 16: 128 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 136.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 2.12500000 17: 136 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 153.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 2.25000000 18: 144 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 171.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 2.37500000 19: 152 0x0003 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 190.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 2.50000000 20: 160 0x0000 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 210.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
WheelRun.key
Code:
# KEYFRAME WheelRun.key created by Puppet Jedi 0.6 ############### SECTION: HEADER FLAGS 0x0000 TYPE 0xFFFF FRAMES 361 FPS 90 JOINTS 1 ############### SECTION: KEYFRAME NODES NODES 1 NODE 0 MESH NAME OBJECT01 ENTRIES 5 # num: frame: flags: x: y: z: p: y: r: # dx: dy: dz: dp: dy: dr: 0: 0 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 1: 90 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 90.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 2: 180 0x0002 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 180.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 3: 270 0x0003 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 270.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 4: 360 0x0000 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
WheelUp.key
Code:
# KEYFRAME WheelUp.key created by Puppet Jedi 0.6 ############### SECTION: HEADER FLAGS 0x0000 TYPE 0xFFFF FRAMES 161 FPS 16 JOINTS 1 ############### SECTION: KEYFRAME NODES NODES 1 NODE 0 MESH NAME OBJECT01 ENTRIES 18 # num: frame: flags: x: y: z: p: y: r: # dx: dy: dz: dp: dy: dr: 0: 0 0x0003 0.00000000 0.00000000 -0.40000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00125000 0.00000000 0.00000000 2.00000000 1: 8 0x0003 0.00000000 0.00000000 -0.39000000 0.00000000 0.00000000 16.00000000 0.00000000 0.00000000 0.00250000 0.00000000 0.00000000 1.87500000 2: 16 0x0003 0.00000000 0.00000000 -0.37000000 0.00000000 0.00000000 31.00000000 0.00000000 0.00000000 0.00375000 0.00000000 0.00000000 1.75000000 3: 24 0x0003 0.00000000 0.00000000 -0.34000000 0.00000000 0.00000000 45.00000000 0.00000000 0.00000000 0.00500000 0.00000000 0.00000000 1.62500000 4: 32 0x0003 0.00000000 0.00000000 -0.30000000 0.00000000 0.00000000 58.00000000 0.00000000 0.00000000 0.00625000 0.00000000 0.00000000 1.50000000 5: 40 0x0003 0.00000000 0.00000000 -0.25000000 0.00000000 0.00000000 70.00000000 0.00000000 0.00000000 0.00750000 0.00000000 0.00000000 1.37500000 6: 48 0x0003 0.00000000 0.00000000 -0.19000000 0.00000000 0.00000000 81.00000000 0.00000000 0.00000000 0.00625000 0.00000000 0.00000000 1.25000000 7: 56 0x0003 0.00000000 0.00000000 -0.14000000 0.00000000 0.00000000 91.00000000 0.00000000 0.00000000 0.00500000 0.00000000 0.00000000 1.12500000 8: 64 0x0003 0.00000000 0.00000000 -0.10000000 0.00000000 0.00000000 100.00000000 0.00000000 0.00000000 0.00375000 0.00000000 0.00000000 1.00000000 9: 72 0x0003 0.00000000 0.00000000 -0.07000000 0.00000000 0.00000000 108.00000000 0.00000000 0.00000000 0.00250000 0.00000000 0.00000000 0.87500000 10: 80 0x0003 0.00000000 0.00000000 -0.05000000 0.00000000 0.00000000 115.00000000 0.00000000 0.00000000 0.00250000 0.00000000 0.00000000 0.75000000 11: 88 0x0003 0.00000000 0.00000000 -0.03000000 0.00000000 0.00000000 121.00000000 0.00000000 0.00000000 0.00250000 0.00000000 0.00000000 0.62500000 12: 96 0x0003 0.00000000 0.00000000 -0.01000000 0.00000000 0.00000000 126.00000000 0.00000000 0.00000000 0.00125000 0.00000000 0.00000000 0.50000000 13: 104 0x0002 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 130.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.37500000 14: 112 0x0002 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 133.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.25000000 15: 120 0x0002 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 135.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.12500000 16: 128 0x0002 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 136.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.37500000 17: 160 0x0000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 180.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
and this template:
Code:
# DESC: # BBOX: -.4 -.025 -.4 .4 .025 .4 rounddoor _zwalkstruct thingflags=0x400848 model3d=dr4.3do size=0.400781 movesize=0.400781 puppet=cr.pup
What happens is:
When I activate pad (or left or right), the wheels... I don't know how they come down because they are under at least 3 floors, but when I go down to them, they aren't moving in a circle around Y! They move 25° on Z and 10° on X, then snap back to original position in a loop like that! Then when I press the pad again, they have stopped rotating but haven't gone back up!
HELP!
/Edward