How does OBJECTCFG work?

OBJECTCFG is a lump name that the game automatically recognizes as a SOC(Sonic Object Configuration) file, and it is meant to be used to configure objects,(object types, states. etc) but since version 2.1(.15?) you can use any lump name as a soc file not just MAINCFG(the lump name not the block) and OBJECTCFG if it has SOC_ prefix it will be recognized as a soc file.
To define a custom object in SOC
It should be something similar to this
Object defeniton:
Object MT_BLUECRAWLA
MapThingNum = 100
SpawnState = S_POSS_STND
SpawnHealth = 1
SeeState = S_POSS_RUN1
SeeSound = sfx_None
ReactionTime = 32
AttackSound = sfx_None
PainState = S_NULL
PainChance = 200
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_NULL
DeathState = S_XPLD1
XDeathState = S_NULL
DeathSound = sfx_pop
Speed = 3
Radius = 24*FRACUNIT
Height = 32*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_None
Flags = MF_ENEMY|MF_SPECIAL|MF_SHOOTABLE
RaiseState = S_NULL
You can find out more about these parameters on the srb2 wiki for states they should be defined somewhat like this
state defenition:
State S_POSS_RUN1
SpriteName = POSS
SpriteFrame = A
Duration = 3
Next = S_POSS_RUN2
Action = A_Chase
Var1 = 0
Var2 = 0
You can also find more about states on the SRB2 wiki
https://wiki.srb2.org/wiki/Freeslot
https://wiki.srb2.org/wiki/Custom_Object_tutorial
I might have gotten something wrong or missed something lol
 

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

Back
Top