Attach arbitrary code to entities #1524
Labels
C-Project
A larger project, more suitable for experienced contributors.
G-Design
An issue having to do with game design.
G-Entities
An issue having to do with game entities.
S-Nice to have
The bug fix or feature would be nice but doesn't currently have much negative impact.
T-Challenges
Involves the challenge scenarios - shorter games with objectives.
Z-Feature
A new feature to be added to the game.
The idea is still kind of fuzzy in my head, and would require a lot more work to hash out a concrete design, but the basic idea is: why not be able to attach code to entities, not just robots?
e.g. perhaps when you
use
an entity (see #1287), it also triggers any code associated with the entity (which would run with system privileges inside aninstant
block, perhaps?). This could be really cool for scenario design. e.g. imagine creating amagic wand
which uponuse
causes magical things to happen, like other entities appearing etc. Or imagine you wanted to make a challenge where every time you move it requires using up some kind of fuel. You could accomplish this by creating a new entity with some associated code which moves you and consumes some fuel (in order to move you would have touse thing
instead ofmove
).For a more advanced version, perhaps there could be some way to attach multiple named definitions to an entity, and a way to send it "messages" to trigger the right piece of code.
The text was updated successfully, but these errors were encountered: