Hey guys, It's me again, and I wanna make a boss that whenever he gets inside specific sector, he calling a specific state from SOC. (The boss itself also built from SOC)
There are no ways that I know of to do this PURELY with SOCs. However, it is possible with the aid of Lua. The below code, when placed in a lump with a name starting with "LUA_" (the last four characters of the lump name can be whatever you want), will create a custom action that can be used in a SOC just like vanilla actions can be. Simply set the action to A_ChangeStateInSector, var1 to the tag of the chosen sector, and var2 to the desired state.
Code:
//If the object that calls this action is in a sector with a tag equal to var1, set it to state var2.
function A_ChangeStateInSector(obj, var1, var2)
if obj.subsector.sector.tag == var1 then
obj.state = var2
end
end
Status
Not open for further replies.
Who is viewing this thread (Total: 1, Members: 0, Guests: 1)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.