SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing Help

Reply
 
Thread Tools Search this Thread
Old 09-16-2020   #1
Icalasari
Default 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
__________________
Wow my account was edgy. Working on a revamp of my old Tails Doll mod

Last edited by Icalasari; 09-16-2020 at 09:44 PM.
Icalasari is offline   Reply With Quote
Old 09-17-2020   #2
Icalasari
Default

Ok getting sick and tired of this stupid script


Quote:
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|M F_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
__________________
Wow my account was edgy. Working on a revamp of my old Tails Doll mod

Last edited by Icalasari; 09-17-2020 at 02:23 AM.
Icalasari is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.