Adding tags to tiles, sprites, items

  1. Describe your reason for requesting this feature. What problems are you running into?

Gets pretty tedious to add the same rule when interacting with a group of similar items. For example
I have several types of windows and need to have the player be able to look out the window. I have to check if the item is a window which happens to be a few different items.

  1. How would this request improve your experience with using Pulp?

Tagging items would allow the user to interact with a group of items as the same type.
Like tag all trees with #tree and in code see if the tile is a #tree and then do something, instead of seeing if it's tree-a, tree-b, tree-c, big-climbable-bush, etc.

  1. Include any other details you have relating to this request.
2 Likes

Would you get the same result by having different items listen to group-specific events. So all the different types of trees could have an on treeAction do event.

2 Likes

Agree on this as a workaround if tags aren’t implemented.

If you add something along the lines of

on update do
  tell xOfWhatYourInteractingWith,YOfWhatYourInteractingWith to
    call “windowLook”
  end
end

And then only put the windowLook event in the sprites that are windows, you can achieve this, though that requires your to copy windowEvent into each window sprite. On the plus side, it allows certain windows to behave differently!

Have you tried using the mimic function?

1 Like

I just saw this in another post, looks like the best way! Honestly guides or a cookbook would be awesome in the docs.