Skip to content

Set / get variable by name #771

@Mehdi2000-hub

Description

@Mehdi2000-hub

Reviewed guidelines

  • I have read and understand the suggestion guidelines

Checked for duplicate suggestions

  • I checked for existing similar suggestions

Summary

Letting ability to call variables by their names (string input), and to add variables only to instances that actually need them

Ex:
Enemy object having 2 vars by default:
Name
Health

Enemy 1 instance vars:
Name = UndergroundDragon
Health = 100
FlamesValue = 2
NextTargetUID = 0

Enemy 2 instance vars:
Type = FlyingTurtle
Health = 200
ArmorDuration = 5
VerticalForce = 32.5

Possible workarounds or alternatives

Using dictionary object & families
Making variable playing different role for each instance (Var1 = FlamesValue / ArmorDuration & Var2 = VerticalForce / NextTargetUID)

Proposed solution

Let variables' conditions & actions be callable using string input, & ability to add variables to instances via inspector or events

Why is this idea important?

In certain situations you may want to add a variable to some instances while others doesn't really need to have it
It's not really needed, but would make much more customization to the engine

Additional remarks

I know that this 'simple' feature would come up with lot lot of changes & bugs, still would be so cool, thanks for reading!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions