Drakan
2010-06-03 11:52:50
Pictures and greater description will be added when I get home from school. I'm writing this blindly at school :P
Welcome to my second tutorial in the Reflection tutorial series! In this tutorial I will teach you how to add reflection to your script.
Prerequisites
In order to be able to use reflection in your script, you have to have it first ;) Make sure you have simba and reflection installed!
Adding the Includes
To use reflection, you must include it, as well as SRL.
This will start smart, include srl, and include reflection.
Adding SMART Constants
Adding the constants is important, because if you have SMART load a random world, everytime you go to test your script SMART will restart. To avoid this, just add these constants. You can change their values as needed.
Setting up Reflection and SRL
Now we need to call our setup procedures.
Remember, it is important to declare those Smart constants BEFORE you SetupSRL.
The Reflection Template: http://code.google.com/p/simbareflection/source/browse/trunk/Tools/Template.Simba
Welcome to my second tutorial in the Reflection tutorial series! In this tutorial I will teach you how to add reflection to your script.
Prerequisites
In order to be able to use reflection in your script, you have to have it first ;) Make sure you have simba and reflection installed!
Adding the Includes
To use reflection, you must include it, as well as SRL.
{$DEFINE SMARt}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
This will start smart, include srl, and include reflection.
Adding SMART Constants
Adding the constants is important, because if you have SMART load a random world, everytime you go to test your script SMART will restart. To avoid this, just add these constants. You can change their values as needed.
program ReflectionScript;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
const
{---SMART Setup Constants---}
WORLD = 32;
MEMBERS = false;
SIGNED = true;
{---------------------------}
begin
end.
Setting up Reflection and SRL
Now we need to call our setup procedures.
begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
SetupSRL;
SetupReflection(true);
end.
Remember, it is important to declare those Smart constants BEFORE you SetupSRL.
The Reflection Template: http://code.google.com/p/simbareflection/source/browse/trunk/Tools/Template.Simba
