MrDoge124

  • Content Count

    59
  • Joined

  • Last visited

Community Reputation

3 Neutral

About MrDoge124

  • Rank
    Junior Member
...

Recent Profile Visitors

701 profile views
  1. That's a very intresting set up. Never seen that before. So this means I could make a wall that's scary to prey so the butterflies get stuck. But I'm not sure this would stop all flying creatures, only flying prey or regular prey.
  2. I didn't know that. So if I trapped a bat in walls would it be possible to make a new type of wall they can't fly over?
  3. Hello, I was thinking about making walls that flying things can't fly over. Does anyone know how I could do this or have any suggestions on what I could do?
  4. I got it to work. I asked a friend and we fixed it. So while poking around at another character, we discovered differences in the code that allowed us to reverse engineer a solution. With the error message telling us that “Inst” was a null value. Initially we thought that Inst was always in reference to the player whenever it’s called. THIS IS NOT THE CASE. We then found that whenever we declared a function, "Inst" was not declared. AddModRPCHandler(“Green”,"GREEN_STUN", function(---INST IS MISSING HERE---) We changed “Inst” to “player” just to make the code more readable in the future and then changed any reference to Inst into player. In addition to this, several functions were missing declarations which we fixed by adding player. AddModRPCHandler(“Green”,"GREEN_STUN", function(player) Thanks for the help!
  5. I've tried to add RPC handlers to the code but it doesn't work, I'm not sure what I'm doing. I've found this error in the code.
  6. I've seen mods use those before but I'm not sure how I'd set one up for myself.
  7. In this previous post I managed to get a AOE stun attack working. However when I enable caves it doesn't work. Turns out I think I'm missing something. It might be an action handler or some sort of net code which could be why it doesn't work when caves are enabled. It also doesn't crash or print anything to the logs, So I'm not sure why it isn't working. This is the code. It's all contained inside a character lua file. Any help would be appreciated.
  8. I've looked at other examples and they all seem to use an action handler. I'm going to have to look into this and either figure out how these things work or try to find another way to do it.
  9. When I enable caves it does nothing, no errors. Nothing is printed even if I tell it to print something. I think something isn't being triggered properly. My best guess is the "TheInput:AddKeyDownHandler(KEY_Z, function()" part isn't working right as nothing happens when I press Z. I might have to add an action for the attack, but I'm not sure how that works. I've found an example where actions are used and it seems to work fine.
  10. I'm not sure what to do. I've looked at other aoe attacks and they seem to have stuff like "SendRPCToServer" and the code mentions actions. I've attached the code I'm using right now if you need it. green.lua
  11. Sorry to bother you but it doesn't seem to work when I enable caves. I think this might be because I don't have any networking code and I have no idea how to do that... Any help would be appreciated.
  12. Ok I got it to work with some help from a friend. Here is the code Also the keyhandler.lua which goes in a components folder in scripts. Thank you for the help! I'm sorry if i was being a pain.
  13. So I got it to find other things and the basics work Here is what I did to get it to work. (It probably isn't very efficient.) I'm not sure how to get cool downs to work and the effects to the character. (Turning off the light and the sanity penalty.)
  14. I think I'm missing something, because I get this error when I press the key [00:01:43]: [string "../mods/Green/modmain.lua"]:198: attempt to index local 'instToBuff' (a nil value) LUA ERROR stack traceback: ../mods/Green/modmain.lua:198 in (upvalue) ApplyBuff (Lua) <194-234> buffData = table: 4B41C1D0 instToBuff = nil buffUniqueName = stunbuff ../mods/Green/modmain.lua:273 in (field) fn (Lua) <272-274> scripts/events.lua:46 in (method) HandleEvent (Lua) <42-49> self = events = table: 29B1A1C0 event = 122 arg = nil handlers = table: 4B41C2C0 k = table: 4B41C270 v = true scripts/input.lua:187 in (method) OnRawKey (Lua) <184-191> self = onkeyup = table: 29B1A3F0 entitiesundermouse = table: 8E1BCF40 onmousebutton = table: 29B19F40 controllerid_cached = 0 onkey = table: 29B1A3C8 enabledebugtoggle = true ongesture = table: 29B1A418 mouse_enabled = true ontextinput = table: 29B1A648 position = table: 29B1A760 onkeydown = table: 29B1A198 oncontrol = table: 29B1A8C8 key = 122 down = true scripts/input.lua:396 in () ? (Lua) <395-397> key = 122 is_up = true [00:01:43]: [string "../mods/Green/modmain.lua"]:198: attempt to index local 'instToBuff' (a nil value) LUA ERROR stack traceback: ../mods/Green/modmain.lua:198 in (upvalue) ApplyBuff (Lua) <194-234> ../mods/Green/modmain.lua:273 in (field) fn (Lua) <272-274> scripts/events.lua:46 in (method) HandleEvent (Lua) <42-49> scripts/input.lua:187 in (method) OnRawKey (Lua) <184-191> scripts/input.lua:396 in () ? (Lua) <395-397> I think I'm just being stupid here, but I'm not sure what is wrong.