how to use addObject
To addObject() the object has to be in an inactive layer.


you need to use:

import bge
def main():

cont = bge.logic.getCurrentController()
own = cont.owner
scene = bge.logic.getCurrentScene()

node = scene.objectsInactive['breadcrumb']
life_time = 15
#scene.addObject(object,loc,duration) *duration is in frames
if own['nodeSpawnTimer'] &gt;= 5 and own['nodeCount'] &lt;= 20:
    obj =scene.addObject(node,own, life_time)
    own['nodeCount'] += 1
    own['nodeSpawnTimer'] = 0


Related Documentation