creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Button animation on a compound gadget?   
clohse
Mad Scientist

clohse
United States  

 visit clohse's website: Clohse's page at the CWiki
  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
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  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.



 
clohse
Mad Scientist

clohse


 visit clohse's website: Clohse's page at the CWiki
  8/5/2013

That does it! Thanks so much!

CLohse's Norns at the Creatures Repository
 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki