Jump to content

SlinkyRaptor

Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

SlinkyRaptor last won the day on February 22 2015

SlinkyRaptor had the most liked content!

About SlinkyRaptor

  • Birthday 10/08/1990

Profile Information

  • Gender
    Male
  • Location
    NSW, Australia

SlinkyRaptor's Achievements

Newbie

Newbie (1/14)

11

Reputation

  1. I've recently commissioned some artwork for my mobile game. The artist has provided me with a separate SCML file for each different animation. Is there an easy way to combine these animations into a single entity in one SCML file or is this something I will have to write a script for? edit: a couple of small python scripts kind of do what I want. The second one being unfinished but workable. entitymerge.py from xml.dom import minidomtext_file = open("output.scml", "w")xmldoc1 = minidom.parse('sideview.scml')xmldoc2 = minidom.parse('famine3.scml')# add files from secondfile1count = len(xmldoc1.childNodes[0].childNodes[1].childNodes)file2count = len(xmldoc2.childNodes[0].childNodes[1].childNodes)fileList1 = xmldoc1.getElementsByTagName('file')fileList2 = xmldoc2.getElementsByTagName('file')for s in fileList2: s.attributes['id'] = str(int(s.attributes['id'].value) + len(fileList1)) xmldoc1.childNodes[0].childNodes[1].appendChild(s)# rename file references in secondobjectList2 = xmldoc2.childNodes[0].childNodes[3].getElementsByTagName("object")for s in objectList2: s.attributes['file'] = str(int(s.attributes['file'].value) + len(fileList1))# add entities from secondentityList2 = xmldoc2.getElementsByTagName('entity')for s in entityList2: xmldoc1.childNodes[0].appendChild(s)text_file.write(xmldoc1.toxml())text_file.close() animationmerge.py from xml.dom import minidomtext_file = open("output2.scml", "w")xmldoc1 = minidom.parse('output.scml')# record first entityentityList = xmldoc1.getElementsByTagName('entity')i = 0animId = len(entityList[0].getElementsByTagName('animation'))# iterate through non first entityfor s in entityList: if(i > 0): # modify entities bone references # add entity bone refs to first entity bone references # re-ID animations in entity and add to entity 0 animationList = s.getElementsByTagName('animation') for s in animationList: s.attributes['id'] = str(animId) s.attributes['name'] = "anim_" + str(animId) animId += 1 entityList[0].appendChild(s) #remove entity from file i += 1text_file.write(xmldoc1.toxml())text_file.close()
  2. Would very much still like a response to this.
  3. I played around with getting soundlines into this for my JavaFX project. It works pretty well but I imagine someone could come up with a much more efficient and neat implementation. I think I should be able to able to set the volume of a sound relative to the distance of it's source from the player as well as shift balance from left to right.
  4. I purchased a key for myself and a friend recently and I was wondering if or how I could get steam keys for both of those. I followed the directions in the sticky, emailed support and only received a single key.
  5. Turns out I'd been working Discobeards branch. I've made a new test script for the Trixt0r branch. http://pastebin.com/YZS3SUur Be gentle with me. I think this is the first bit of code I've put up on the internet. It's very similar to the Java2D test code. It just draws JavaFX images to a canvas.
  6. Just spent my morning making myself a JavaFX canvas based example. I love what you guys have made with this. It makes bone based animation so easy.
×
×
  • Create New...