Mostly fixed problem with A_RotateSpikeBall

Status
Not open for further replies.

pastel

‫‬‭‮‪‫‬‭‮
EDIT: SOC is kind of fixed, removed outdated information. The only bug left is that the rotating bullets are no longer destroyed when they hit an enemy, and there doesn't seem to be a way to make them do that, so no need to bother with this unless you know how to restore that behavior.
 
Last edited:
I think you can edit the topic title by editing your first post's title.

About the SOC, isn't frame 2197 supposed to be a loop, as in, having its next state = 2197?
 
I've never had to do that in a SOC before, but I tried it anyway. No change, still broken as ever.

For reference, here is the original SOC:

Code:
FRAME 1353
SPRITENUMBER = 191
SPRITESUBNUMBER = 32768
DURATION = 1
NEXT = 1353
ACTION A_RotateSpikeBall
VAR1 = 21
VAR2 = 0
Just saying...

Anyway, set the speed, radius and height to the ones from the 1.09.4 version and also try setting the flags value to 66048 instead.

Another thing, because the object is a thokitem, you don't need to find it a new target player. When the item is spawned, it sets its target automatically to the player who spawned it, so you can give it the A_RotateSpikeBall action on its spawn state. Also, keep the loop.
 
Anyway, set the speed, radius and height to the ones from the 1.09.4 version and also try setting the flags value to 66048 instead.

Another thing, because the object is a thokitem, you don't need to find it a new target player. When the item is spawned, it sets its target automatically to the player who spawned it, so you can give it the A_RotateSpikeBall action on its spawn state. Also, keep the loop.

Okay, I did all this, and it's still completely broken.

Oh, about that "I've never had to do this before" thing, I meant for 2.0 character ability SOCs, the old one was a 2 year old ringslinger SOC and I wasn't paying attention to the next state. :P Anyways, I've gone ahead and kept the loop.

EDIT: Setting ghostthokitem = 1 makes it spawn an invisible orange Sonic for a second. I don't know if this is relevant to the problem, but yeah.
 
Last edited:
Yes, you should set ghostthokitem to 1 to 0 so the item can actually perform socced actions.

About your problem, show us your current SOC along with the S_SKIN1 and OBJCTCFG lumps so we may help you understand what's wrong.
 
Last edited:
Yes, you should set ghostthokitem to 1 so the item can actually perform socced actions.

I thought it was 0. I know none of my other SOCs work properly unless ghostthokitem = 0. I switched it just to see what happened.

Anyways, here's the SOC again:

Code:
Thing 406
MAPTHINGNUM = -1
SPAWNSTATE = 2197
SPAWNHEALTH = 1000
SEESTATE = 0
SEESOUND = 127
REACTIONTIME = 8
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 0
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 0
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 450000
RADIUS = 720896
HEIGHT = 524288
MASS = 100
DAMAGE = 20
ACTIVESOUND = 0
RAISESTATE = 2197
FLAGS = 66048

FRAME 2197
SPRITENUMBER = 78
SPRITESUBNUMBER = 0
DURATION = 1
NEXT = 2197
ACTION A_RotateSpikeBall
VAR1 = 108
VAR2 = 0
I'm using a copy of tails.plr to test the soc, and here's the S_SKIN:

Code:
name = tails
face = SBOTLIFE
facename = STTAILSN
ability = 0
actionspd = 0
thokitem = 406
ghostthokitem = 0
normalspeed = 32
thrustfactor = 3
accelstart = 192
acceleration = 50
startcolor = 160
prefcolor = 5
jumpheight = 100
superanims = 0
mindash = 15
maxdash = 60
No OBJCTCFG lump because tails.plr doesn't have one.
 
Last edited:
Yeah, sorry about that on the ghostthokitem, it's supposed to be set to 0, not 1. x_x

Set the spawnstate of thing 406 to 2197.
 
Set the spawnstate of thing 406 to 2197.

It says 2197 in the SOC though. I have no idea where that 9 came from.

EDIT: Fixed the copy pasted SOC to have the correct spawnstate.

EDIT: I tried replacing the broken SOC with another ability SOC I know works, and it still works. So it's definitely not a problem with the test WAD.
 
Last edited:
Uhm, well, the problem lies around the flag MF_MISSILE. If you remove it, it works, however that will make it not kill anything and being perpetually rotating around the player...

Since that's not what you want, I guess I can't really help you with this one, not now anyway. Perhaps later I might find a solution for this. If not, there's always Draykon =P
 
Code:
Thing 406
MAPTHINGNUM = -1
SPAWNSTATE = 2197
SPAWNHEALTH = 1000
SEESTATE = 0
SEESOUND = 127
REACTIONTIME = 8
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 0
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 0
DEATHSOUND = 0
XDEATHSTATE = 0
SPEED = 450000
RADIUS = 720896
HEIGHT = 524288
MASS = 100
DAMAGE = 20
ACTIVESOUND = 0
RAISESTATE = 2197
FLAGS = 66048

FRAME 2197
SPRITENUMBER = 78
SPRITESUBNUMBER = 0
DURATION = 1
NEXT = 2197
ACTION A_RotateSpikeBall
VAR1 = 108
VAR2 = 0
That code works fine for me. Should it do anything else besides rotating around the player and harming enemies on contact? :p
 
Morph said:
That code works fine for me. Should it do anything else besides rotating around the player and harming enemies on contact? :p

That's exactly what it's supposed to do. For me, it does absolutely nothing.

Ricardo said:
Uhm, well, the problem lies around the flag MF_MISSILE. If you remove it, it works, however that will make it not kill anything and being perpetually rotating around the player...
I tried removing MF_MISSILE and it works, but yeah, no damage to enemies. At first it still didn't work at all, but that's what I get for manually changing the flags. I fixed the typo, and am now messing with the flags to see if I can't get something to work.

EDIT: I've got it to where it can damage enemies by keeping the MF_MISSILE flag, but adding MF_COUNTITEM and MF_SHOOTABLE. It doesn't dissipate upon collisions like the original, but it's now in a working state.
 
Last edited:
This is veeeeeery odd.
If you just change the thing to 157 and exchange nothing else (except thokitem = 157 or removing thokitem = 406 in the S_SKIN) it works. However, changing it to any other ID failed in my tries.

Using a copy of Thing type 165, for example, on any other slot as a thokitem works fine nevertheless. :o

There might be an issue with A_RotateSpikeball not liking certain caller mobj type IDs. Since I am really tired right now and I have to sleep I kind of fail to spot the error. I guess someone has to take a closer look into the sourcecode (I am not able do that right now *yawn*).... :|
 
This is veeeeeery odd.
If you just change the thing to 157 and exchange nothing else (except thokitem = 157 or removing thokitem = 406 in the S_SKIN) it works.

Putting the SOC on 157 overwrites the default thokitem, though, and I don't want other thokitems and spinitems showing up as a missile. Testing it on 157 with the broken SOC I posted here does work, though the missiles still don't disappear on hit. For some silly reason, it will only work on slots other than 157 if the MF_COUNTITEM flag is checked, so enabling that flag makes it work on 406.

I'm not even sure what MF_COUNTITEM is supposed to do, but this does seem to be some sort of bug.
 
Last edited:
The MF_COUNTITEM flag is incorrectly named in SOCEdit, it's actually named MF_NOCLIPHEIGHT. This flag makes an object being able to go under a sector's floor or above its ceiling. This means your missile is, for some reason, being placed underground or above the ceiling of the player's current sector at sometime. That's why it only works with that flag.
 
Status
Not open for further replies.

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

Back
Top