PDA

View Full Version : Need some help with SOCs!



Lat'
April 2nd, 2014, 13:22
Yes I'm actually trying to port My devil super sonic boss to release it here but I am not able to do it.
I tried everything but, it doesn't even spawn, it says that SpawnState etc. are uknow words and says that he can't found the states.

Here is the start of the code:

FREESLOT
MT_DEVILSS
Object DEVILSS


MapThingNum = 4022
SpawnState = S_DEVSPAWN
SpawnHealth = 8
SeeState = 1806
SeeSound = 127
ReactionTime = 32
AttackSound = 0
PainState = 1840
PainChance = 200
PainSound = 0
MeleeState = S_DEVATCK11
MissileState = 1838
DEATHSTATE = 1846
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 7
RADIUS = 1572864
HEIGHT = 2097152
MASS = 100
DAMAGE = 2
ACTIVESOUND = 0
RAISESTATE = 1842
FLAGS = MF_BOSS|MF_SHOOTABLE|MF_NOGRAVITY|MF_FLOAT|MF_SPEC IAL


#Devil Super Sonic's spawn state:


FRAME S_DEVSPAWN
SPRITENUMBER = 245
SPRITESUBNUMBER = 0
DURATION = 1
NEXT = DEVSPAWN
ACTION None
VAR1 = 0
VAR2 = 0


#Devil Super Sonic charging and firing a bomb ring at the player:


FRAME S_DEVATCK11
SPRITENUMBER = 245
SPRITESUBNUMBER = 2
DURATION = 35
NEXT = S_DEVATCK12
ACTION A_PlaySound
VAR1 = 156
VAR2 = 0


FRAME S_DEVATCK12
SPRITENUMBER = 245
SPRITESUBNUMBER = 0
DURATION = 15
NEXT = 1835
ACTION A_FireShot
VAR1 = 223
VAR2 = 0

Here are the bunch of error it spawns:
6664

So if anyone can at least convert the spawnstate and the melee state... Do it please...

Sky
April 2nd, 2014, 13:30
Here's what would fix it:


FREESLOT
MT_DEVILSS
S_DEVSPAWN
S_DEVATCK11
S_DEVATCK12

Thing MT_DEVILSS
MapThingNum = 4022
SpawnState = S_DEVSPAWN
SpawnHealth = 8
SeeState = 1806
SeeSound = 127
ReactionTime = 32
AttackSound = 0
PainState = 1840
PainChance = 200
PainSound = 0
MeleeState = S_DEVATCK11
MissileState = 1838
DEATHSTATE = 1846
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 7
RADIUS = 1572864
HEIGHT = 2097152
MASS = 100
DAMAGE = 2
ACTIVESOUND = 0
RAISESTATE = 1842
FLAGS = MF_BOSS|MF_SHOOTABLE|MF_NOGRAVITY|MF_FLOAT|MF_SPEC IAL

#Devil Super Sonic's spawn state:

STATE S_DEVSPAWN
SPRITENUMBER = 245
SPRITESUBNUMBER = 0
DURATION = 1
NEXT = DEVSPAWN
ACTION None
VAR1 = 0
VAR2 = 0

#Devil Super Sonic charging and firing a bomb ring at the player:

STATE S_DEVATCK11
SPRITENUMBER = 245
SPRITESUBNUMBER = 2
DURATION = 35
NEXT = S_DEVATCK12
ACTION A_PlaySound
VAR1 = 156
VAR2 = 0

STATE S_DEVATCK12
SPRITENUMBER = 245
SPRITESUBNUMBER = 0
DURATION = 15
NEXT = 1835
ACTION A_FireShot
VAR1 = 223
VAR2 = 0
I get no errors with this code.
You also need to put frames in the FREESLOT category.

(Btw, you can also refer to FRAME as STATE, so I just changed that because state is used more)

Maybe a little bit more help: http://wiki.srb2.org/wiki/State

Lat'
April 2nd, 2014, 13:37
Oh thankgod... You just save my life, gonna try it!
But it doesn't spawn, it puts a "!" sing instead of the object.
What is still wrong with this?

Sky
April 2nd, 2014, 13:43
I'm pretty sure that means there's a missing sprite.

Try instead of using a SpriteNumber, change that to SpriteName and give it an actual name (look at wiki article!). Same with SpriteSubNumber, change that into SpriteFrame (again see wiki). Remember to put it under FREESLOT too.

Updated slightly. I changed "Thing" to "Object" and removed the unnecessary MT_, and added S_ in one of your states in your Object flags (States always need that S_ prefix).



FREESLOT
MT_DEVILSS
S_DEVSPAWN
S_DEVATCK11
S_DEVATCK12

Object DEVILSS
MapThingNum = 4022
SpawnState = S_DEVSPAWN
SpawnHealth = 8
SeeState = 1806
SeeSound = 127
ReactionTime = 32
AttackSound = 0
PainState = 1840
PainChance = 200
PainSound = 0
MeleeState = S_DEVATCK11
MissileState = 1838
DEATHSTATE = 1846
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 7
RADIUS = 1572864
HEIGHT = 2097152
MASS = 100
DAMAGE = 2
ACTIVESOUND = 0
RAISESTATE = 1842
FLAGS = MF_BOSS|MF_SHOOTABLE|MF_NOGRAVITY|MF_FLOAT|MF_SPEC IAL

#Devil Super Sonic's spawn state:

STATE S_DEVSPAWN
SPRITENUMBER = 245
SPRITESUBNUMBER = 0
DURATION = 1
NEXT = S_DEVSPAWN
ACTION None
VAR1 = 0
VAR2 = 0

#Devil Super Sonic charging and firing a bomb ring at the player:

STATE S_DEVATCK11
SPRITENUMBER = 245
SPRITESUBNUMBER = 2
DURATION = 35
NEXT = S_DEVATCK12
ACTION A_PlaySound
VAR1 = 156
VAR2 = 0

STATE S_DEVATCK12
SPRITENUMBER = 245
SPRITESUBNUMBER = 0
DURATION = 15
NEXT = 1835
ACTION A_FireShot
VAR1 = 223
VAR2 = 0


This thread might help if you haven't seen it too (the last post by Sonic100000 is good): http://mb.srb2.org/showthread.php?t=38428

Again, here's the wiki article that will help you: http://wiki.srb2.org/wiki/State