Problems with cloning cards...

Stephen King st.king42 at ntlworld.com
Mon Mar 1 11:56:04 EST 2004


Hi All,

I should have stuck with one card stacks....!

I am having some trouble understanding cloning cards. I am using the clone
approach at the moment so that card script is carried over (maybe templates
are the way but I haven't investigated them yet).

1. In the script
On..handler
.......
Clone card template
.....
end handler
does the script complete or terminate immediately the clone takes place. I
ask this because for a while it seemed that scripts after the clone did
occur (in my case sending a message to the new card), but now nothing seems
to happen after the clone takes place. I have tested this by placing an
Answer directly after the clone command which does not respond but does if
just before the clone command. The clone itself does occur.

Now, I can get only get the clone card to respond to a message sent to it by
placing 'send message to last card in xxx milliseconds' BEFORE the clone
takes place. Before it was after (without the milliseconds)!

2. When a card is cloned, does it receive any newcard, opencard messages? My
clone doesn't seem to respond to anything like this.

3. Previously, my cloned cards seemed to number themselves upwards from the
original. Now they SEEM (not 100% sure) to be pushing the original up and
numbering themselves 1 etc! If it doesn't become the last card this gives me
some problems as I send an initialise message to the last card after
cloning.

As you can see, I'm a little confused!

Cheers
Steve



More information about the use-livecode mailing list