PDA

View Full Version : How Do I Use the Same Custom Methods on Other Characters of the Same Class?


cbw92
03-01-2009, 03:11 PM
I had a few questions about Custom methods if you guys don't mind.

1. Can you save custom methods to use in different Alice files? I.E. I take my Run Method for T-Rex and use it in 3 other worlds on other T-rexs.

2. Can I copy my methods to other characters of the same class in the same world? Currently I have One T-rex with a Custom Lunge adn Walk method, and I would like to use these on my other 3 T-rexs in the world without totally remaking each method from scratch.

Thank your for your time!

ottar9919
03-01-2009, 06:54 PM
Yes there is a way. First, put everything in the method into one block, like a "Do In Order". Then drag it to the clipboard. Go to File>Open and open the second world. The items on the clipboards should still be there. You can then drag the do in order block in the clipboard into the methods section.

Important-this will only work if the object(T-Rex) is already in the second world, and it has to have the same name as in the first world. Otherwise Alice will not recognize it and set all values to null.

cbw92
03-01-2009, 07:17 PM
That worked perfectly, thanks a bunch!

JustasM
03-01-2009, 11:51 PM
Another way would be first to put all the methods you want on the object (T-Rex), then right click- save object. Once you save it, you can load it to any other world, and it will retain its variables/methods/functions/properties.