Tutorials on making a followitem in Lua, & is it possible to script two to follow?

Icalasari

Member
Tutorials on making a followitem in Lua, & is it possible to script two to follow?

Basically, the MT_TAILSOVERLAY stuff is a bit... Odd to figure out exactly how to make a custom followitem in Lua, so I'm wondering if there is a good tutorial on that, especially if it can list how to tie the frames to different states

Secondly, is it possible to have two at once via Lua? I want my mod's super state to have a fake 'shield' over top, with the doll protected by said super 'shield'. If it's not possible, I'll probably sprite the tails into the eventual super sprite and find a way to switch to a partially transparent followitem on going super, it would just be easier if I can have two at once


EDIT: Figured out the first one thanks to Jon. When I get something working up, I'll put up a stripped version of it here for people to use themselves as a template

Second still don't have an answer for, but if I figure it out before it gets answered here, I'll edit that in too


EDIT 2: It... There was a tutorial under Overlay why is it not labelled a tutorial
 
Last edited:
Ok getting sick and tired of this stupid script


freeslot(
"MT_ICATAILSDOLLT",
"S_ICATAILSDOLLTAILSA",
"S_ICATAILSDOLLTAILSB",
"SPR_TDTL"
)

states[S_ICATAILSDOLLTAILSA] = {
sprite = SPR_TDTL,
frame = A,
duration = 1,
action = A_MoveRelative,
var1 = 1,
var2 = 0,
next = S_ICATAILSDOLLTAILSB
}

states[S_ICATAILSDOLLTAILSB] = {
sprite = SPR_TDTL,
frame = B,
duration = 1,
action = A_MoveRelative,
var1 = 1,
var2 = 0,
next = S_ICATAILSDOLLTAILSA
}

mobjinfo[MT_ICATAILSDOLLT] = {
spawnstate = S_ICATAILSDOLLTAILSA,
spawnhealth = 1,
seestate = S_NULL,
seesound = sfx_None,
reactiontime = 0,
attacksound = sfx_None,
painstate = S_NULL,
painchance = 0,
painsound = sfx_None,
meleestate = S_NULL,
missilestate = S_NULL,
deathstate = S_NULL,
xdeathstate = S_NULL,
deathsound = sfx_None,
speed = 10,
radius = 16*FRACUNIT,
height = 32*FRACUNIT,
dispoffset = 1,
mass = 16,
damage = 0,
activesound = sfx_None,
flags = MF_NOBLOCKMAP|MF_FLOAT|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY|MF_RUNSPAWNFUNC,
raisestate = S_NULL
}
Nothing changes no matter what I change unless by 'change' one means it shows nothing

Is this why nobody makes custom followitems? Because they all do crap like this?

I am actually VERY endlessly frustrated, it won't even cycle through states to animate




EDIT: This has been the single most frustrating thing ever I think I know less now than when I went in
 
Last edited:

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

Back
Top