Lua Help (I NEED HELP)

Cosmic

somewhat decent(?) at lua scripting
Can someone help me make a lua script that changes the player's ability? With Custom1 being the airdrill, and custom2 being the default ability set by S_SKIN. Thanks!
 
I meant someone actually makes it and sends it to me. But I can try myself.
 
(I've never coded with SRB2 Lua so correct me if I'm wrong)
Try
if player = <playername.skin>
when <button = custom1> is pressed
change player.charability

I don't know if this would work but send responses if this works for you.
 
It doesn't work like that, it's more like:
Code:
if player.mo and player.mo.skin = "skinname"
and player.cmd.buttons & BT_CUSTOM1
    player.charability = CA_AIRDRILL
else
    player.charability = skins["skinname"].ability
end
Replace skinname with the character's name value of course.
 
I tried that but all I learned was the Drop Spin (aka The Fast Drop). But I can try again.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top