Add to card 1 script:
Code: Select all
command showCard
answer the number of this card
end showCard
Code: Select all
send "showCard" to card 1
I get "2" in both cases.
Anyone?
Thanks,
Sri
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
command showCard
answer the number of this card
end showCard
Code: Select all
send "showCard" to card 1
Code: Select all
Local lNum
on opencard
put the number of me into lNum
end opencard
Code: Select all
command showCard
put "This cd/ Cd Num:" && the number of this card & " ; LNum:" && lNum & CR & \
"Me/ Cd Num:" && the number of me & " ; LNum:" && lNum
end showCard
Code: Select all
This cd/ Cd Num: 2 ; LNum: 1
Me/ Cd Num: 1 ; LNum: 1
and:Use the this keyword to indicate the current card or current stack in an expression.
andUse the me keyword within a handler to determine which object's script is executing.
Have fun!Use the local command [...] to define a script local variable that is shared between all the handlers in a script.