Am 24.06.11 09:22, schrieb xsaint:
> Good day,
>
> I am attempting to create a new node via nasal
> I will like to call the node as "TempNode" with a int value of 50 and i
> will like to create it at /sim[0]/temp/.
>
> If the node was created, it will look like /sim[0]/temp/TempNode with a
> value of 50
>
> I am very much confused with nasal and i was wondering how do i create
> such a node.
>
> props.Node.new("/sim[0]/temp/TempNode",50);  ???
>
>

if you want to access TempNode often in your nasal, use

var myTempNode = props.globals.getNode("/sim/temp/TempNode", 1);
myTempNode.setIntValue( 50 );


or if you just set the node's value once:

setprop( "/sim/temp/TempNode", 50 );

Torsten

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to