- Joined
- Nov 17, 2016
- Messages
- 9
So, I have an issue with a map I am making. In short, it's a map where you collect the souls of creatures and can use them for various purposes. When a creature is created, it spawns with an item (i.e. Ghoul Soul) and you can kill it to acquire its soul. However, the issue with this is that every creature has its own unique item it's supposed to spawn with and I don't want to have to create a trigger for every single creature or to use a massive string of If/Then/Else comparisons. What I want is a less convoluted solution.
My original idea was to use a string check to create the item (Name of creature+Soul), but that doesn't work without having the items stored somewhere like a hashtable as a point of reference first. Going through and manually adding every item to the hashtable kind of defeats the point of what I wanted to do in the first place.
Is there another method I could use to approach this problem? I'd be grateful for any advice or answers.
My original idea was to use a string check to create the item (Name of creature+Soul), but that doesn't work without having the items stored somewhere like a hashtable as a point of reference first. Going through and manually adding every item to the hashtable kind of defeats the point of what I wanted to do in the first place.
Is there another method I could use to approach this problem? I'd be grateful for any advice or answers.