123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
-
- import bge
-
- def ai(cont):
- # own = cont.owner
- # scene = bge.logic.getCurrentScene()
- # #actu = cont.actuators['start_level']
- # dict = bge.logic.globalDict
- # objList = scene.objects
- # mainDir = bge.logic.expandPath("//")
- # skater = 'ai_ed'
- #
- # fileName = mainDir + "npc_skaters/" + str(skater) + '.blend'
- #
- # path = bge.logic.expandPath(fileName)
- # bge.logic.LibLoad(path, 'Scene')
- #
-
- # # get object named MainCharacter
- # armature = objList["npc_ed_arm"]
-
- # # combine child's shape with parent's
- # compound = True
-
- # # child is solid
- # ghost = False
-
- # # set parent
- # armature.setParent( own, compound, ghost)
-
- print('loading ai')
-
- def main(cont):
- own = cont.owner
- scene = bge.logic.getCurrentScene()
- actu = cont.actuators['start_level']
- dict = bge.logic.globalDict
- mainDir = bge.logic.expandPath("//")
-
- fileName = mainDir + "characters/" + str(dict["character"]) + '.blend'
-
- path = bge.logic.expandPath(fileName)
- bge.logic.LibLoad(path, 'Scene')
-
- fileName = mainDir + "assets/" + 'bmx_player' + '.blend'
-
- path = bge.logic.expandPath(fileName)
- bge.logic.LibLoad(path, 'Scene')
- fileName = mainDir + "assets/" + 'prop_bike.blend'
-
- path = bge.logic.expandPath(fileName)
- bge.logic.LibLoad(path, 'Scene')
-
-
- # fileName = mainDir + "characters/sun.blend"
- #
- # path = bge.logic.expandPath(fileName)
- # bge.logic.LibLoad(path, 'Scene')
-
-
- cont.activate(actu)
-
-
|