Welcome, Guest! Login | Register
Imposter creation at runtime
Info
Report
49 Posts

I want to create imposter at runtime as required in the game. Suppose i created 3 imposter at runtime. When further moving in the game i required 4 more imposter of the same object so that total of 7 imposters in the game. Can it be done?
Created on: 3 months ago
Info
Report
460 Posts

the imposter object is your friend.. play with it to solve your issue.

Also note..
Imposters can be created in scripting, but as it turns out, a imposter ball object created with the script commands wont roll on surfaces's but slides instead.
But, the imposter object does create balls that will roll as you would expect.
.
If you've never used rigidbody imposters before, make sur when you create more than one, that you add a script loop to seperate them apart.
In 3drad, if you don't seperate the rigidbodies, they will instantly collide with each other and shoot off in random directions,
Created on: 3 months ago
Edited on: 3 months ago
Info
Report
37 Posts

Quote from: TinSoldier


If you've never used rigidbody imposters before, make sur when you create more than one, that you add a script loop to seperate them apart.
In 3drad, if you don't seperate the rigidbodies, they will instantly collide with each other and shoot off in random directions,


that's useful if you want to create an explosion with debris
Created on: 2 months ago
Info
Report
103 Posts

ah hawk, the artistic indie game dev, hope you are progressing well with your project...
Created on: 2 months ago
Info
Report
460 Posts

@icanseethat  
Also.. a little trick i found out about imposters..

When 1 script creates imposters, you can link the source object to a different script and still access it's imposters with the script imposter functions.

Not to sure if this also works with the imposter object though, i've never tried it.

There's a mini test project for you... can a script object access the imposter objects imposters... ?
Created on: 2 months ago
Edited on: 2 months ago
Info
Report
103 Posts

i'll save him the time, if it can, it's not documented, as you refer to scripted  'int = imposter index'

unless imposter index is an in/out script function of the imposter object, which is highly unlikely, given that imposter quantity is dynamic, while in/outs are not.
Created on: 2 months ago
Edited on: 2 months ago
Reply
Preview
Post
Or use the advanced reply form here...
Sponsored