I don't understand Battle LUA

So i've been looking inside Cobalt's battle mod LUA and uh...

B.GotFlagStats = function(player)
local skin = skins[player.mo.skin]
//Register debuff
if player.gotflag and player.gotflagdebuff == false then
player.gotflagdebuff = true
end
//Unregister debuff and apply normal stats
if not(player.gotflag) and player.gotflagdebuff == true then
player.gotflagdebuff = false
player.normalspeed = skin.normalspeed
player.acceleration = skin.acceleration
player.charability = skin.charability
player.charability2 = skin.charability2
player.charflags = skin.charflags
end
//Apply debuff
if player.gotflagdebuff
player.normalspeed = skin.normalspeed*18/20
player.acceleration = skin.acceleration*8/10
player.charability = CA_NONE
player.charability2 = CA2_NONE
player.charflags = SF_NOJUMPSPIN
end
end [Spoiler/]

(also how the hell do you do spoiler text, it's literally nowhere in here.)
Anyway uh... I checked the LUA, and I don't understand where the "Player is not allowed to use midair ability (such as thok, twinspin, fly, glide, float, bounce) while holding the flag." Also whenever I add this, if someone has the flag, then it works fine, but if they toss the flag... it doesn't revert them back to normal, (they stay like this)

I don't understand how Cobalt used P_PlayerInPain or something for Fang "weapon delay" yet I swear it does nothing, I press spin ***IMMEDIATELY*** after getting in my "STANDING" frames, and I shoot the cork, even though there's SUPPOSED to be a delay. Changing the numbers do nothing.
For reference im posting this

B.GunControl = function(player)
if P_PlayerInPain(player) and player.charability2 == CA2_GUNSLINGER then
player.weapondelay = TICRATE/10
end
end

this is what I assume is "supposed" to make it so Fang can't shoot the first frame he is in standing frames.
I tried making a "if vulnerable" or something but that just made the gun not work completely.
 
ok ive figured everything out thats listed here

---------- Post added at 05:45 PM ---------- Previous post was at 05:21 PM ----------

I am now trying to make Rock Blast make you slow with
"mo.player.normalspeed = skins[mo.skin].normalspeed*3/8"
since that is used to make the player slow in the battlemod.
But I don't know where or how to "apply normal stats"
 

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

Back
Top