P_Attract Lua

P_Attract Lua v1

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
I made sure my file(s) follow the Submissions Guidelines
  1. Yes
Global P_Attract function for lua!

Simply copy the code inside into a script, and use P_LookForPlayers before P_AttractLua!

Lua:
//pull rings towards us when we're close enough
//Example script inside the file to show off P_AttractLua
//Actual function is inside the download file
addHook("MobjThinker", function(mobj)
    if (mobj.type == MT_RING)
    //ringslinger rings
    or ((mobj.type == MT_BOUNCERING) or (mobj.type == MT_RAILRING))
    or ((mobj.type == MT_INFINITYRING) or (mobj.type == MT_AUTOMATICRING))
    or ((mobj.type == MT_EXPLOSIONRING) or (mobj.type == MT_SCATTERRING) or (mobj.type == MT_GRENADERING) or (mobj.type == MT_REDTEAMRING) or (mobj.type == MT_BLUETEAMRING))
    //coin
    or (mobj.type == MT_COIN)
        P_LookForPlayers(mobj, 260*mobj.scale, true, true)
        if mobj.tracer
            P_AttractLua(mobj, mobj.tracer, false)
        end
    end
end, MT_NULL)

Imgur because gif too large

ratoto.gif
Author
luigi budd
Downloads
485
Views
2,239
Extension type
lua
File size
2.8 KB
MD5 Hash
4f861680c49f9cbd1f975a152f5951e5
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from luigi budd

Share this resource

Back
Top