vayamos con lo primero, estoy haciendo un tuto y sigo las instrucciones alpie de latera, copio este script lo ejecuto y me sale error, a ver si sabeis decirme por que.
function main()
{
engine.RunScript("rtk", nil);
global var world = engine.GetCurrentWorld();
var list = world.GetActorList("Male");
Ambient(list); <----- AQUI ESTA EL PROBLEMA
var output = "F:\Mental\Output";
var input = "F:\Mental\Input/render.bvrn";
global var mental = new MentalRay(world, output, input);
mental.MapTarget("GreenSuit", "Male", 0);
mental.MapTarget("BrownSuit", "Male", 1);
mental.MapTarget("GreenSuitLoRez", "Male", 2);
mental.MapTarget("BrownSuitLoRez", "Male", 3);
mental.SynchToCamera(TRUE);
var camerap = world.GetCameraTransform().position;
var d = new DrvVector(0,0,0);
var actor;
for(actor = list.First(); actor != nil; actor = list.Next())
{
var p = actor.GetRootNode().GetGlobalTransform().position;
d.Subtract(camerap, p);
if(d.Magnitude() > 200)
mental.SubmitActor(actor, Math.Rand()%2 + 2);
else
mental.SubmitActor(actor, Math.Rand()%2);
}
InitializeRecord(24);
world.AddPiccoloActivityByName("update");
global var tick = 0;
}
function update(act, time, obj)
{
Console.PrintNl(tick++);
if(tick == 100)
mental.StartCapture("out", "image");
else if(tick == 111)
{
mental.Close("render.bat", "-verbose on");
RuntimeStop();
}
}
VM exception declared........: no such variable
' ambient? : variable doe not exist