PWADp rawset(_G, "PTAIinit", function(p) p.ptaiinit = 1 p.ptaiframewait = 0 p.ptaicolor = 1 CONS_Printf(p, "Pizza Tower Variables set.") return true end) freeslot("SKINCOLOR_AIREALLYRED") freeslot("SKINCOLOR_AIREALLYGREEN") skincolors[SKINCOLOR_AIREALLYRED] = { name = "Really Red", ramp = {35,35,35,35,35,35,35,35,35,35,35,41,41,41,41,41}, invcolor = SKINCOLOR_AIREALLYGREEN, invshade = 9, chatcolor = V_REDMAP, accessible = true } //freeslot("SKINCOLOR_SOAPAIREALLYGREEN") skincolors[SKINCOLOR_AIREALLYGREEN] = { name = "Really Green", ramp = {100,100,100,100,100,100,100,100,100,100,100,191,191,191,191,191}, invcolor = SKINCOLOR_AIREALLYRED, invshade = 35, chatcolor = V_GREENMAP, accessible = true }addHook("PlayerThink", function(p) if not p.valid return end if not p.ptaiinit PTAIinit(p) return end if p.mo.valid and p.mo local me = p.mo p.accSpeed = abs(FixedHypot(p.rmomx,p.rmomy)) //more accurate speed thing //make after images when we're going fast!!! if (p.dashmode >= (3*TICRATE)) or ((p.powers[pw_sneakers]) and (p.accSpeed > p.runspeed)) // or ((p.accSpeed > p.normalspeed) and (p.nerfed)) and not (p.pflags & PF_STARTDASH) PizzaTowerAfterImages(p, me, p.ptaicolor) if not p.ptaiframewait p.ptaiframewait = 3 if p.ptaicolor == 1 p.ptaicolor = 2 else p.ptaicolor = 1 end else p.ptaiframewait = $ -1 end end end end) //taken from my other addon, Soap the Hedge //nothing fancy here, just regular ghosts //scrap that, lets add some pizza tower styled afterimages!! //lets make this follow the soap, so we can actually see the thing rawset(_G, "PizzaTowerAfterImages", function(p, me, color) // local ghost = P_SpawnGhostMobj(me) // ghost.frame = TR_TRANS80 // ghost.destscale = $*99 if p.ptaiframewait return end local chasecam = CV_FindVar("chasecam") local afteri = P_SpawnGhostMobj(me) if color == 1 afteri.color = SKINCOLOR_AIREALLYRED elseif color == 2 afteri.color = SKINCOLOR_AIREALLYGREEN end afteri.colorized = true afteri.frame = FF_FULLBRIGHT|me.frame|TR_TRANS10 afteri.fuse = 14 //should you be out of my face? if chasecam.value afteri.flags2 = $ & ~MF2_DONTDRAW else afteri.flags2 = $ | MF2_DONTDRAW end end) LUA_INITòLUA_AFTI_LUA_FUNC