Suggestion Issue: Block for referencing behaviours (similar to "Actor type" block)


Pages: 1

dtishin

  • Subscriber - Stencyl Indie
  • *
May 29, 2020, 08:00:51 am
Design mode only allows to refer to behaviours by their "name", not by their unique ID that the engine actually uses.
This means if I change the behaviour name, I need to manually look through the whole of my project code to find all instances where I mentioned that behaviour, otherwise there will be runtime crashes. 
I spent many hours catching bugs of this sort in my project.
 
Having a block similar to  "Actor group" or "Actor type" would save a lot of time and also eliminate human error. These blocks are fantastic because you don't care if  you renamed an actor type - it will be automatically updated in the code.


Justin

  • Master Stencyler
  • *
June 03, 2020, 02:26:47 am
I'm actually thinking to move the other way with Stencyl. Less IDs, more names and paths. However, things like this should certainly be able to be caught by Stencyl, updated throughout the program as soon as you make such a change, and not cause logic errors or crashes later on.
  • Tags added: 5.0.0


dtishin

  • Subscriber - Stencyl Indie
  • *
June 03, 2020, 03:16:42 am
- Just to clarify, I didn't mean that the internal ID should be visible to the user.
- Please also note that the text fields in blocks like "For actor, get / set attribute..." can be filled dynamically, which means the compiler won't detect these issues. 
- Having the ability to dynamically access attributes and behaviours through text fields is fantastic, it adds flexibility. But in most cases I'd rather refer to an attribute / behaviour by a separate block that excludes possibility of human error. I suppose it would also be fix cases where the engine is trying to access an attribute / behaviour that no longer exists.
- So IMHO ideally there should be two sets of blocks for referring to  local attributes and behaviours - by text fields (i.e. the current set of blocks) plus the  one with no freeform text fields.


Pages: 1

Details

  • Reported
    May 29, 2020, 08:00:51 am
  • Updated
    June 11, 2020, 04:04:24 am

  • View Status
    Public
  • Type
    Suggestion
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Design Mode Blocks

Tags