GalaxySugar

  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

1 Neutral

About GalaxySugar

  • Rank
    Junior Member
...

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. Edit : Completely misunderstood what FindWalkableOffset did. Using it still results in the player still able to teleport past the waterfalls on the northwest and southeast sides of the ocean, so it's not really any better than what I was using before...
  2. edited the original post, I was super tired when I made it. I can already teleport the character where I want it to, I just need it to refuse to teleport there if its out of bounds.
  3. I'm working on a mod where a specifc character can get a position from the map and teleport to that position, this works, but they can teleport into ocean void past the waterfalls and cave void. Currently using this to check if the position. local tile = GLOBAL.TheWorld.Map:GetTileAtPoint(self.minimap:MapPosToWorldPos(x, y, z)) if tile == GLOBAL.GROUND.IMPASSABLE or tile == GLOBAL.GROUND.INVALID then print("Can't go there!") return end and it barely works... The character can still teleport if the ocean void is on the Northwest or Southeast sides on the surface along with random spots in the cave void. Any way to fix this?
  4. I know I can use SoundEmitter:PlayingSound to check for a specific sound, but is there a way to check if ANY sound is being played?
  5. Ah, great thats actually everything I have table related done! thank you once again for everything you've done to help!
  6. Yeah, it spawns a copy of all the items in the bundle on the floor
  7. Oh! sorry, I completely blanked on that lmao. spawning a bundle with the items works again but now it also spawns a copy of the items where the action was preformed... which I can't find any indication on why?
  8. ah, it works to save and load but now it crashes with the function the character uses to spawn the items in a bundle The log: LUA ERROR stack traceback: scripts/components/unwrappable.lua:38 in (method) WrapItems (Lua) <33-45> ../mods/Whiskers-The-catoon/scripts/prefabs/watcoon.lua:91 in (upvalue) SpawnBundle (Lua) <74-96> ../mods/Whiskers-The-catoon/scripts/prefabs/watcoon.lua:162 in (local) fn (Lua) <138-166> scripts/entityscript.lua:1047 in (method) PushEvent (Lua) <1034-1061> scripts/components/eater.lua:221 in () ? (Lua) <182-246> =(tail call):-1 in () (tail) <-1--1> scripts/bufferedaction.lua:25 in (method) Do (Lua) <21-35> scripts/entityscript.lua:1325 in (method) PerformBufferedAction (Lua) <1312-1335> scripts/stategraphs/SGwilson.lua:4230 in (field) fn (Lua) <4228-4236> scripts/stategraph.lua:572 in (method) UpdateState (Lua) <540-584> scripts/stategraph.lua:611 in (method) Update (Lua) <603-631> scripts/stategraph.lua:128 in (method) Update (Lua) <109-153> scripts/update.lua:233 in () ? (Lua) <164-243> The character function: local function SpawnBundle(inst) local items = {} for i, v in ipairs(inst.stored_items) do table.insert(items, v) end for i, v in ipairs(items) do if type(v) == "string" then items[i] = SpawnPrefab(v) end end local bundle = SpawnPrefab("bundle") bundle.components.unwrappable:WrapItems(items) inst.components.inventory:GiveItem(bundle) end
  9. AddAction("FAKE_EAT", "Eat", function(act) if act.invobject.components.stackable ~= nil then local item = act.invobject.components.stackable:Get(1) table.insert(act.doer.stored_items, item) item:Remove() return true else local item = act.invobject table.insert(act.doer.stored_items, item) item:Remove() return true end end) I've been using a action to just insert them into the table when done.
  10. I've actually tried that already, it just crashes when it saves. I should probably clarify that this table is used to store deleted items for later use.
  11. Got a new problem thats also table related and I haven't messed around with saving or loading data that much so, how can I get my character to save and load a table so that it can be used if they leave and rejoin or if the server restarts?
  12. Finally, everything works lmao. Thanks so much for all your help, I really appreciate it!
  13. Works completely fine unless the player is moving around on a dedicated server. they'll continue to move before rubberbanding back into position.
  14. Doing that fixed eating a second food but the whole stack still vanishes right after.