Booker
New Member
- Joined
- Apr 2, 2015
- Messages
- 46
- Reaction score
- 4
Hello, i'm using TFS 1.2 and i just cant get to return a monster instance using Creature() on a custom made monster passing in it's name as param.
This works:
This doesn't:
I've registered the creature in monsters.xml, created it's LUA file(copied from another one) and i'ts spawning normally. I just don't understand why i can't instance it in my code to work with.
Appreciate your help!
This works:
Lua:
local monster = Creature("rabbit")
monster:getName()
>> Rabbit
This doesn't:
Lua:
local monster = Creature("myMonster")
monster:getName()
>> nil
I've registered the creature in monsters.xml, created it's LUA file(copied from another one) and i'ts spawning normally. I just don't understand why i can't instance it in my code to work with.
Appreciate your help!