Mirror object on an axys after is added with addObject

i have a fight game .
similar to 2D game street fighter.
but using 3D models rigged.
when the model 3d spawns on the opposite side (as Opponent) i would that the entire object be a Mirrored version of the normal Pose.
i tried everything, but when an object (also a group) is called, the attribute are the same present on InactiveObject layers.
there is a way for mirror it AFTER is called?
I tried to setSize and localScale but doesnT works.

   elif "SpawnThisPlayer" in obj:
                if obj['SpawnThisPlayer']==1:
                    #scene.objectsInactive[DictModelChar1[EmptyGM['CharPick1']]].playAction("MirrorX1", 0, 26, 0, 1, 0, 0, 0, 0, 1) i tried to animate , but if the object is inactive no action can be applyed
                    Player1=scene.objectsInactive[DictModelChar1[EmptyGM['CharPick1']]]
                    Player1['mirrorP1']=1 # a label for check the properties that allow mirroring
                    #Player1.localScale[-1,1,1] i tried to mirror on X axys ,DoesnT works
                    Fighter1 =scene.addObject(Player1,obj, 0)              
                    obj['SpawnThisPlayer']=0 #deactive spawn
                    #Fighter1.localScale[-1,1,1] neither the called object can be scaled

/SOLVED
i mirrored the obj that generate the spawn obj.

nice ! can’t wait to see pictures/videos of progress

For any of those interested in related Vector functions, those are nice and pretty useful (for example : to know direction a character should bounce back on the floor (reflect) ; how much 2 forces are colliding (dot) ; etc … )

docs.blender.org/api/2.79b/mathutils.html?highlight=vector#mathutils.Vector
.dot
.project
.reflect
.rotate
.rotation_difference

1 Like

Nice tips ^^
Do you know how change a value of a property of a child object ?
My problem is :
“fighter box” with all comands and position
have the “Action_status property” when this changes the child (“an armature” ) should change ITS property too.
How to access to this child object?

    for h in Fighters:
        for cm in h.children:
            if "CharModel" in cm: ## property for label the armature obj
                cm['ActionStatus']=h['StatusChar'] ##the cm armature will copy the Fighterbox property

could works? at the moment nothing happens.

I used a simple distance verify.
when the model spawns is parent if distance is nearly 0.001
also copy the properties of the generator, that is the controller too.
:frowning: brutal, but works

basic features works ^^

1 Like

interesting !

how do you make your logics here ? would you show ?

1 Like

For the menu, the faster way (for CPU) is use logic brick related to single icon.
For the event sequence is better a Python.
For all timers i prefered logic brick, cause is easy check in the debug info.
Also for custom the variety of moves and action ,python is a lot better, also visualize 10-20 functions ,using logic brick is not pratic.
I could post the code for the various option during menu choice and the relative “reset” . (paradoxally, every variable could remain in the choice also if not selected cause the system memorize pretty well, and until there is a reset, the choice is confirmed.)