Allow ability to override parent variables
<!-- Please fill in *all* the questions below and don't remove any of them. Proposals not following the template below will be closed immediately. --> **Describe the project you are working on:** Arcanoid Clone for learning **Describe the problem or limitation you are having in your project:** I have a scene BrickParent that has behaviours for all my bricks in a game. I then want multiple inherited scenes of that scene to be different colour bricks. Each brick is worth different amount of points in the game In my BrickParent scene I have var points = 0 I then want this var points to be different in each inherited scene. So In my inherited scene I created a inherited script that inherits from BrickParent.gd if I type var points = 50 U will get error Member 'points' already exists in parent class. I would like to be able to override this just how I can override some of the functions in parent class that already exist. **Describe how this feature / enhancement will help you overcome this problem or limitation:** This will will make code easier to follow across different inherited scenes. And allow for faste rprototyping **Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:** N/A **Describe implementation detail for your proposal (in code), if possible:** I can't help here I have no idea how to do it. **If this enhancement will not be used often, can it be worked around with a few lines of script?:** I would expect it to be
Posted by Maciej-Gorczyca on Dec 27, 2019, 10:20 PM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (EdTech)
Message limit 10000 team edition
[NEW] Data Tiering - Valkey as general data store not just in-memory data store
Info: No releases on google play for now
proposal: spec: sum types based on general interfaces
Users can't use IdPs outside of the ones enumerated by RPs
CLIP Training Code
Implement a Set primitive to complement Dictionary and Array
better documentation of reborrowing
Allow ability to override parent variables
<!-- Please fill in *all* the questions below and don't remove any of them. Proposals not following the template below will be closed immediately. --> **Describe the project you are working on:** Arcanoid Clone for learning **Describe the problem or limitation you are having in your project:** I have a scene BrickParent that has behaviours for all my bricks in a game. I then want multiple inherited scenes of that scene to be different colour bricks. Each brick is worth different amount of points in the game In my BrickParent scene I have var points = 0 I then want this var points to be different in each inherited scene. So In my inherited scene I created a inherited script that inherits from BrickParent.gd if I type var points = 50 U will get error Member 'points' already exists in parent class. I would like to be able to override this just how I can override some of the functions in parent class that already exist. **Describe how this feature / enhancement will help you overcome this problem or limitation:** This will will make code easier to follow across different inherited scenes. And allow for faste rprototyping **Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:** N/A **Describe implementation detail for your proposal (in code), if possible:** I can't help here I have no idea how to do it. **If this enhancement will not be used often, can it be worked around with a few lines of script?:** I would expect it to be
Comments (0)
No comments yet. Start the discussion.