Search results for query: *

  1. Zipper

    How do i remove rings when player uses custom ability?

    You need to set player.rings, player.health doesn't exist, and player.mo.health is unused. Well, it's not used for rings at least. (I swear I've said this somewhere else before) Also, just write "20", "$20" means "the 20th variable at the left of the expression". Lua isn't very Assembly-pilled.
  2. Zipper

    Ring Racers Custom Characters Sprite Sheet Confusion

    The answer's "yes" to both of those.
  3. Zipper

    Ring Racers Custom Characters Sprite Sheet Confusion

    Here's a better reference. Was sent to me by MotorRoach, though I don't know who the original creator is.
  4. Zipper

    SRB2 Add-ons, and GPL-compliance.

    The linux kernel has a line that specifically excludes system calls from being part of the GPL license. I don't have any strong opinions on this matter as I don't see GPL mattering outside of genuine legal issues, but it's worth pointing out.
  5. Zipper

    Uninspired mods nowadays?

    Seeing a character mod with a full set of sprites (that is over 170 by the way), alongside unique gameplay mechanics ESPECIALLY in Takis' case, playing them, and then calling it "lazy character making" sure is...a take. I'll try to interpret your message as generously as possible and assume you...
  6. Zipper

    How does "end" work in lua?

    There is no end with the bracket. You might be thinking of the time when you put an entire function in an addHook. addHook("ThinkFrame", function() print("test") end) This is a scenario where a bracket might follow an "end". The bracket is part of the function, not the code block itself...
  7. Zipper

    How does "end" work in lua?

    it's used to "close" every block you start. --end closes "if" blocks if (something) then end --end closes "if-else" blocks if (something2) then else end --end closes function blocks local function test() print("henlo stinky") end --end closes for-loops for val in pairs(sometable) do...
  8. Zipper

    I don't know how to create particles

    ...mobj it creates, so: local spawnedparticle = P_SpawnMobj(p.mo.x, p.mo.y, p.mo.z, MT_CUSTOMPARTICLE) spawnedparticle.momx = P_ReturnThrustX(p.mo, p.mo.angle, -4*FRACUNIT) spawnedparticle.momy = P_ReturnThrustY(p.mo, p.mo.angle, -4*FRACUNIT) This spawns a particle and makes it move backwards...
  9. Zipper

    A Lua Glossary For Starters

    Wanted to build a site that focuses on teaching the basics of SRB2 Lua in a concise and accessible manner, while giving examples that could also be used in an actual mod, so that they don't feel superfluous and actually teach the readers something. It's currently sort of barebones due to me...
  10. Zipper

    how to remove rings

    Rings haven't been tied to player.mo.health for a long time. Deduct from player.rings instead.
  11. Zipper

    Official Level Design Collab 2023: Round 2

    Okay I'm geriatric and can't figure out how to add inline media without uploading them to another site first, so I'll just attach all points of interest I could find on a repeat playthrough. Mostly my issue with the decor is "things that seem helpful but aren't" (first two screenshots) or "is...
  12. Zipper

    Official Level Design Collab 2023: Round 2

    Sheesh, 31 levels. I don't even remember if I was around for an OLDC this big. Great work to everyone involved, though! I can tell all of these levels were created with intent to impress. Gonna leave my thoughts on each level as a few bullet points if any of you are looking for feedback...
  13. Zipper

    the visual´s lua problem

    Well, you can simply ignore the button press check if the player's already in the S_PLAY_FALL state. Though if you're looking for a more general purpose solution, I've provided an answer to a similar problem here https://mb.srb2.org/threads/lua-help-button-wise.40736/post-629429 It involves...
  14. Zipper

    How to make an upwards thrust

    local function ThrustUp(player) P_SetObjectMomZ(player.mo, 12*FRACUNIT, false) return true end addHook("AbilitySpecial", ThrustUp) Don't bother with SOC actions when Lua already has a function that does (approximately) the same thing. P_SetObjectMomZ makes the player launch up at a...
  15. Zipper

    Lua help (button wise)

    If you get an error about an "unexpected symbol", it usually means you wrote something wrong: bad variable name, unclosed brackets, unclosed "if" statements etc. Protip : Whenever you write an "if" statement, ALWAYS put the "end" to close it before you start writing the middle. It's like...
  16. Zipper

    Lua help (button wise)

    There is no direct way to check if a button is simply being pressed instead of held. You can, however, increase a counter whenever the button is held, and reset it when released. local function Test(p) if not (p.counter) then p.counter = 0 end if (p.cmd.buttons & BT_CUSTOM1) then...
  17. Zipper

    Help with Spinning Movement

    Okay, THAT part I can't explain. I've tried playing with thrustfactor/acceleration as well and it did not affect forward speed at all. If someone more knowledgeable with the source comes up I'd love to hear it.
  18. Zipper

    Help with Spinning Movement

    ...and not (p.pflags & PF_STARTDASH) and P_IsObjectOnGround(p.mo)) then local movepushforward = p.cmd.forwardmove * p.thrustfactor * p.acceleration local movepushangle = p.mo.angle p.mo.momx = $ + P_ReturnThrustX(p.mo, movepushangle, movepushforward)...
  19. Zipper

    How to use a shield's ability without the shield part in Lua

    I don't believe there is a way to play those effects directly without re-writing them yourself. You could try to store the player's current shield, force them to press spin in the PreThinkFrame and restore their shield after the ability activates, but that would be EXTREMELY easy to mess up...
Back
Top