from bge import logicfrom mathutils import Vector
sce = logic.getCurrentScene()
cont = logic.getCurrentController()
own = cont.owner
hlight1=sce.objects['highlightshine']
hlight2=sce.objects['highlightshine.001']
hlight3=sce.objects['highlightshine.002']
hlight4=sce.objects['highlightshine.003']
lightspeed = 1.97
thing = sce.objects['Charactertrack']
own.worldPosition = Vector((thing.worldPosition.x, thing.worldPosition.y, own.worldPosition.z))
if own['PLAY'] == True:
own.playAction('highlightcol', 1, 241, layer=0, priority=0, blendin=0, play_mode=2, layer_weight=0.0, ipo_flags=0, speed = lightspeed)
hlight1.playAction('highlightcol', 1, 241, layer=0, priority=0, blendin=0, play_mode=2, layer_weight=0.0, ipo_flags=0, speed = lightspeed)
hlight2.playAction('highlightcol', 1, 241, layer=0, priority=0, blendin=0, play_mode=2, layer_weight=0.0, ipo_flags=0, speed = lightspeed)
hlight3.playAction('highlightcol', 1, 241, layer=0, priority=0, blendin=0, play_mode=2, layer_weight=0.0, ipo_flags=0, speed = lightspeed)
hlight4.playAction('highlightcol', 1, 241, layer=0, priority=0, blendin=0, play_mode=2, layer_weight=0.0, ipo_flags=0, speed = lightspeed)
elif own['PLAY'] == False:
own.playAction('highlightcol', 0, 0, layer=0, priority=0, blendin=0, play_mode=1, layer_weight=0.0, ipo_flags=0, speed = 1)
own['frame'] = own.getActionFrame(0)
own.stopAction(0)
Hey there, as you can see in this script., i want to apply highlight 1 2 3 4 to have the to run action ‘highlightcol’ once prop 'Play" is true. I would like to ask if there is a way to rewrite these statements into another/ shorten form so that they can syncrhonize together better? kinda like… hlight1/2/3/4/.playAction … I have no idea please help!