Mod Tool: Difference between revisions

1,003 bytes added ,  8 June 2013
m
scripting: read nodes of xml files
m (real-time playback)
m (scripting: read nodes of xml files)
Line 852: Line 852:
  objXMLFile.WriteLine "..."
  objXMLFile.WriteLine "..."
  objXMLFile.Close
  objXMLFile.Close
' '''[] read xml file'''
Set xmlDoc = CreateObject( "Microsoft.XMLDOM" )
xmlDoc.Async = "False"
path = "C:\Users\RRM\Oni\AE\AEInstaller\vanilla\level19_Final\BINACJBOWeapon.xml"
xmlDoc.Load( path )
Set colPosition = xmlDoc.selectNodes( "Oni/Objects/WEAP/Header/Position" )
Set colRotation = xmlDoc.selectNodes( "Oni/Objects/WEAP/Header/Rotation" )
Set colClass = xmlDoc.selectNodes( "Oni/Objects/WEAP/OSD/Class" )
loop_count = xmlDoc.selectNodes( "Oni/Objects/WEAP").length
logmessage "found " & loop_count & " weapons:"
logmessage "================"
for i=0 to loop_count - 1
logmessage colClass.item(i).text
logmessage colPosition.item(i).text
logmessage colRotation.item(i).text
logmessage "----------------"
next
' INFO : found 2 weapons:
' INFO : ================
' INFO : w5_sbg
' INFO : 23.16747 84.8193359 757.1958
' INFO : 0 0 0
' INFO : ----------------
' INFO : w4_psm
' INFO : 18.1105652 84.8193359 749.121
' INFO : 0 0 0
' INFO : ----------------




8,452

edits