- 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
- Yes
Global P_Attract function for lua!
Simply copy the code inside into a script, and use P_LookForPlayers before P_AttractLua!
Imgur because gif too large
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