Shuvit game master repo. http://shuvit.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

walker_load.py 509B

12345678910111213141516171819
  1. import bge
  2. def main(cont):
  3. own = cont.owner
  4. scene = bge.logic.getCurrentScene()
  5. dict = bge.logic.globalDict
  6. objList = scene.objects
  7. mainDir = bge.logic.expandPath("//")
  8. skater = own['chr']
  9. fileName = mainDir + "npc_walkers/" + str(skater) + '.blend'
  10. path = bge.logic.expandPath(fileName)
  11. try:
  12. bge.logic.LibLoad(path, 'Scene', load_actions=True)
  13. print(skater, 'loaded')
  14. except:
  15. print('trying to load', fileName, 'twice')