|
Development Forum |
 |
| Button animation on a compound gadget? | |
|  Mad Scientist
clohse
 

|
8/4/2013 | |
I am trying to make sure that the animations work before I addin any real "actions", so the scripts are empty except for animations. I want the buttons to flash quickly with mouse over then go dark, and flash slowly on activation, then go dark. Everything mostly works until the button is activated; then it does slow flash on mouse over and slow on activate. Sometimes it will also stop on the bright button instead of the dark button.(Did that make sense?)
new: comp 2 24 16104 "sprite" 1 0 750
attr 199
bhvr 40
elas 30
perm 100
aero 20
accg 10
fric 10
tick 10
pupt -1 18 0
*red button
PAT: Butt 1 "sprite" 1 6 -1 8 751 [3 0 255] 1000 1
*yellow button
PAT: Butt 2 "sprite" 2 6 16 -1 751 [3 0 255] 1001 1
*green button
PAT: Butt 3 "sprite" 3 6 31 8 751 [3 0 255] 1002 1
**Put it in the DS Injector Room
seta va00 targ
setv va00 game "CreatorX"
setv va01 game "CreatorY"
doif va00 eq 0 and va01 eq 0
setv va00 6106
setv va01 9209
endi
mvsf va00 va01
*********red button activate
scrp 2 24 16104 1000
inst
part 1
frat 3
anim [3 0 3 0 3 0]
slow
endm
*********yellow button activate
scrp 2 24 16104 1001
inst
part 2
frat 3
anim [3 0 3 0 3 0]
slow
endm
********green button activate
scrp 2 24 16104 1002
inst
slow
part 3
frat 3
anim [3 0 3 0 3 0]
endm
|
Any suggestions?
CLohse's Norns at the Creatures Repository |
 Prodigal Sock
Ghosthande
    

|
8/5/2013 | 1 |
I believe it's because the scripts set FRAT to 3, but you never change it back again; FRAT is a constant variable, like PERM or ATTR, it doesn't reset itself at the end of a script. So the next time you mouse-over the button... FRAT is still set to 3. You could try something like this:
scrp 2 24 16104 X
inst
part X
frat 3
anim [3 0 3 0 3 0]
over
frat 1
endm
|
That will wait until the animation has concluded, and then reset FRAT to 1.
 |
 Mad Scientist
clohse
 

|
8/5/2013 | |
That does it! Thanks so much!
CLohse's Norns at the Creatures Repository |
|