OK i have a object i need to move to a certain position specified in a Global Variable. I’ve tried using own.localPosition = [x,y,z] though it seems not to be owrking at all in this instance. The object spawned using the addObject Actuator then assigned a variable. Using this variable it finds it’s location index in a list. Using this index it finds it’s position. Now it does all that just find, it just won’t move to the position nor orient itself for that matter.
the list it retrieves is behind the # sign
Here is the code:
import bge
# client data = [clientnum,['name',[x,y,z],orientation,action]]
cont = bge.logic.getCurrentController()
own = cont.owner
entitylist = bge.logic.entitylist
clientnumber = own['entity number']
number = bge.logic.entitynumberlist.index(clientnumber)
print('entity', clientnumber, 'Position: ', entitylist[number][1][1])
own.localPosition = entitylist[number][1][1]
own.localOrientation = entitylist[number][1][2]
like i said before it does find the required information it needs. I just need help on why own.localPosition and own.localOrientation isn’t working. Oh and BTW i used both these in a separate blend file and it works fine, just not in this instance for some reason.