Please, any idea about how can I include a conversation agent with natural languages capabilities in a Tundra scene? Thanks in advance Carlos M Lorenzo
El 27 de marzo de 2012 17:49, <[email protected]> escribió: > Today's Topic Summary > > Group: http://groups.google.com/group/realxtend/topics > > - Script for a character in Tundra <#13654d8a094654c6_group_thread_0>[2 > Updates] > - Tundra Script <#13654d8a094654c6_group_thread_1> [7 Updates] > > Script for a character in > Tundra<http://groups.google.com/group/realxtend/t/3f14570d68fae36c> > > Vaibhav Vaidya <[email protected]> Mar 27 05:50PM +0530 > > Hii all, > > I am new to Tundra. I have created a scene. I want to attach a script > to a > character. I tried hard to write a simple script which moves the > character > to-and-fro when the client logs in, but got stuck. > Can anybody suggest a sample script for above mentioned purpose?? > The entity name is UrbanFemale and it has only one animation "Walk", > animation controller name is UrbanFemaleAnimation. > > ~Vaibhav > > > > > "Ali Kämäräinen" <[email protected]> Mar 27 04:30PM +0300 > > Hi, > > Could you try to stick in one thread, instead of creating multiple > threads > for the same issue? > > Grey skies, > Ali Kämäräinen > > > > Tundra Script<http://groups.google.com/group/realxtend/t/c79a86e0ad50d85c> > > Vaibhav Vaidya <[email protected]> Mar 27 03:17PM +0530 > > Hii all, > > var entityNameToFind = "UrbanFemale."; > > function ShowAnimation() > { > var objectToAnimate = scene.GetEntityByName(entityNameToFind); > console.LogInfo("Hey great, I found " + entityNameToFind +" Starting > animation"); > var availableAnims = > objectToAnimate.animationcontroller.GetAvailableAnimations(); > console.LogInfo(availableAnims); > } > else > { > console.LogWarning("Entity " + entityNameToFind + " was not found or > animation controller component is not there! Trying again in 1 > second."); > frame.DelayedExecute(1.0).Triggered.connect(StartAnimation); > } > } > > // Only run on client. One time animation enabling. > if (!server.IsRunning() && !framework.IsHeadless()) > { > StartAnimation(); > } > > > > > Vaibhav Vaidya <[email protected]> Mar 27 03:29PM +0530 > > Hii all, > > I have written the following script. I checked "Run on load" to true. > When > I launch the client see the message: > Hey great, I found UrbanFemale. but do not see the available animation. > > But when i go to view -> scene -> UrbanFemale. -> AnimationController > -> > functions -> GetAvailableAnimations() > It shows me the animation "Walk". > > var entityNameToFind = "UrbanFemale."; > > function ShowAnimation() > { > var objectToAnimate = scene.GetEntityByName(entityNameToFind); > > console.LogInfo("Hey great, I found " + entityNameToFind ); > > var availableAnims = > objectToAnimate.animationcontroller.GetAvailableAnimations(); > console.LogInfo(availableAnims); > } > > if (!server.IsRunning() && !framework.IsHeadless()) > { > StartAnimation(); > } > > > Also, when i run the script view -> scene -> UrbanFemale. -> Script -> > Run() > This runs the script and shows the message: > > Hey great, I found UrbanFemale. > Walk > > Am I missing anything?? > > ~Vaibhav > > > > > Vaibhav Vaidya <[email protected]> Mar 27 03:30PM +0530 > > Please ignore the previous part.. > > > On Tue, Mar 27, 2012 at 3:29 PM, Vaibhav Vaidya > > > > > "Ali Kämäräinen" <[email protected]> Mar 27 02:32PM +0300 > > GetAvailableAnimations() returns a list so you need to print each > element: > > var availableAnims = > objectToAnimate.animationcontroller.GetAvailableAnimations(); > for(var i = 0; i < availableAnims.length; ++i) > console:LogInfo(availableAnims [i]); > > Grey skies, > Ali Kämäräinen > > > > > Vaibhav Vaidya <[email protected]> Mar 27 05:11PM +0530 > > @Ali : > > I tried this also but I see the same results. > > > > > > "Ali Kämäräinen" <[email protected]> Mar 27 04:28PM +0300 > > I see that your script is calling StartAnimation(). However, I see no > such > function in the text you pasted, but only ShowAnimation(). Are you > calling > non-exising function by accident? > > > > > Jonne Nauha <[email protected]> Mar 27 04:29PM +0300 > > The reason why you get a empty list with "Run On Load" is probably > because > the skeleton asset has not been inspected yet for the animation names. > Also > i think you cannot start them if that is the case. This is why later > when y > ou run the script it responds with the proper anim names. > > Seems that there is no proper way to ask > ent.animationctonroller.IsReady() > or IsDetected() etc. So you can just assume to try again in 1 second > if the > animation name list is empty like so: > > if (availableAnims.length <= 0) > frame.DelayedExecute(1.0).... etc.... > > Best regards, > Jonne Nauha > Adminotech developer > > > On Tue, Mar 27, 2012 at 2:41 PM, Vaibhav Vaidya > > > > You received this message because you are subscribed to the Google Group > realxtend. > You can post via email <[email protected]>. > To unsubscribe from this group, > send<[email protected]>an empty message. > For more options, visit <http://groups.google.com/group/realxtend/topics>this > group. > > -- > http://groups.google.com/group/realxtend > http://www.realxtend.org > -- http://groups.google.com/group/realxtend http://www.realxtend.org
