Creating and storing an actor?

Fool

  • Posts: 88
Is there any way to create actors, and/or store them in a list, without explicitly spawning them onto the map?
I'm using actors for items, and I'd like to run code on them, even when they are stored in a characters inventory.
Not all inventories are stored on screen, or as part of the UI either.

I take it some of you have dealt with this? What did you do, store them on screen, and just hide the sprites? Store them off
screen, and just keep them active? I can't see any way of spawning items *without* spawning them on the map.
Any help, experience, or special insight is appreciated. Thanks.

rob1221

  • *
  • Posts: 9473
You can't store actors without creating them, but you can store any text/number data that you might need for the actor.

JeffreyDriver

  • Posts: 2262
Can you explain what exactly what you're trying to do in more detail? What code are you wanting to run on the actors? Could you use Game Attributes? To keep something active use the 'make actor always active' block.

I've used a couple of different techniques
1. Just hide the sprites as you said by changing the opacity, or hiding a layer
2. Using an actor that acts as a spawner and creates a particular actor depending on the conditions that are met.

tigerteeth

  • Posts: 733
Is there any way to create actors, and/or store them in a list, without explicitly spawning them onto the map?
I'm using actors for items, and I'd like to run code on them, even when they are stored in a characters inventory.
Not all inventories are stored on screen, or as part of the UI either.

I take it some of you have dealt with this? What did you do, store them on screen, and just hide the sprites? Store them off
screen, and just keep them active? I can't see any way of spawning items *without* spawning them on the map.
Any help, experience, or special insight is appreciated. Thanks.
I think this is what game attributes were created for. Look them up in the stencylpedia.

Fool

  • Posts: 88
I just wanted to confirm that the way I was doing it was the default way Jeff, instead of their possibly being some other, better method out there that I was unaware of..so thanks for helping with that.
I'm aware I can store data Rob, but I wanted to store objects that have an update event (among other events), without necessarily spawning to the map.

And thanks for the heads up Tiger. I'll check out stencylpedia like you said.

Again, thanks guys.