SRB2 Message Board  

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

Reply
 
Thread Tools Search this Thread
Old 09-01-2016   #1
-CG7244-
Sometimes I sprite "things"
 
-CG7244-'s Avatar
Default I need help to fix my first boss

I have a problem with my first boss object, when i hit him (in this case, the boss its me), the boss cant stop flashing or, stop the boss pain effect, here´s the code (WARNING: Large MAINCFG).

Code:
#Carlos Boss Made by CarlosGamer72

Freeslot
MT_CARLOS_BOSS
S_CARLOSBOSS_STND
S_CARLOSBOSS_WALK1
S_CARLOSBOSS_WALK2
S_CARLOSBOSS_WALK3
S_CARLOSBOSS_WALK4
S_CARLOSBOSS_WALK5
S_CARLOSBOSS_WALK6
S_CARLOSBOSS_WALK7
S_CARLOSBOSS_WALK8
S_CARLOSBOSS_WALK9
S_CARLOSBOSS_WALK10
S_CARLOSBOSS_WALK11
S_CARLOSBOSS_WALK12
S_CARLOSBOSS_WALK13
S_CARLOSBOSS_WALK14
S_CARLOSBOSS_WALK15
S_CARLOSBOSS_WALK16
S_CARLOSBOSS_PAIN1
S_CARLOSBOSS_PAIN2
S_CARLOSBOSS_PAIN3
S_CARLOSBOSS_PAIN4
S_CARLOSBOSS_DEAD
S_CARLOSBOSS_SPINATK0
S_CARLOSBOSS_SPINATK1
S_CARLOSBOSS_SPINATK2
S_CARLOSBOSS_SPINATK3
S_CARLOSBOSS_SPINATK4
S_CARLOSBOSS_SPINATK5
S_CARLOSBOSS_SPINATK6
S_CARLOSBOSS_SPINATK7
S_CARLOSBOSS_SPINATK8
S_CARLOSBOSS_SWORDATK
S_CARLOSBOSS_JUMP0
S_CARLOSBOSS_JUMP1
S_CARLOSBOSS_JUMP2
S_CARLOSBOSS_FALL
S_CARLOSBOSS_STOPJUMPING
S_CARLOSBOSS_ROLLING0
S_CARLOSBOSS_ROLLING1
S_CARLOSBOSS_ROLLING2
S_CARLOSBOSS_ROLLING3
S_CARLOSBOSS_ROLLING4
S_CARLOSBOSS_ROLLING5
S_CARLOSBOSS_ROLLING6
S_CARLOSBOSS_ROLLING7
S_CARLOSBOSS_ROLLING8
S_CARLOSBOSS_STOP
S_CARLOSBOSS_SWORDATK0
SPR_BSPN
SPR_BATK
SPR_CRBS
sfx_BSJUMP
sfx_BSROLL

Object MT_CARLOS_BOSS
MapThingNum = 3012
SpawnState = S_CARLOSBOSS_STND
SpawnHealth = 12
SeeState = S_CARLOSBOSS_WALK1
SeeSound = sfx_None
ReactionTime = 32
AttackSound = sfx_None
PainState = S_CARLOSBOSS_PAIN1
PainChance = 200
PainSound = sfx_None
MeleeState = S_CARLOSBOSS_SWORDATK
MissileState = S_NULL
DeathState = S_CARLOSBOSS_DEAD
XDeathState = S_CARLOSBOSS_DEAD
DeathSound = sfx_pop
Speed = 13
Radius = 24*FRACUNIT
Height = 32*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_None
Flags = MF_BOSS|MF_SHOOTABLE|MF_SPECIAL|MF_BOUNCE|MF_ENEMY
RaiseState = S_NULL

#Initial State

State S_CARLOSBOSS_STND
SpriteName = CRBS
SpriteFrame = A
Duration = 1
Next = S_CARLOSBOSS_WALK1
Var1 = 0
Var2 = 0

#Walk to target

State S_CARLOSBOSS_WALK1
SpriteName = CRBS
SpriteFrame = B
Duration = 2
Next = S_CARLOSBOSS_WALK2
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK2
SpriteName = CRBS
SpriteFrame = C
Duration = 2
Next = S_CARLOSBOSS_WALK3
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK3
SpriteName = CRBS
SpriteFrame = D
Duration = 2
Next = S_CARLOSBOSS_WALK4
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK4
SpriteName = CRBS
SpriteFrame = E
Duration = 2
Next = S_CARLOSBOSS_WALK5
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK5
SpriteName = CRBS
SpriteFrame = F
Duration = 2
Next = S_CARLOSBOSS_WALK6
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK6
SpriteName = CRBS
SpriteFrame = G
Duration = 2
Next = S_CARLOSBOSS_WALK7
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK7
SpriteName = CRBS
SpriteFrame = H
Duration = 2
Next = S_CARLOSBOSS_WALK8
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK8
SpriteName = CRBS
SpriteFrame = I
Duration = 2
Next = S_CARLOSBOSS_WALK9
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK9
SpriteName = CRBS
SpriteFrame = B
Duration = 2
Next = S_CARLOSBOSS_WALK10
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK10
SpriteName = CRBS
SpriteFrame = C
Duration = 2
Next = S_CARLOSBOSS_WALK11
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK11
SpriteName = CRBS
SpriteFrame = D
Duration = 2
Next = S_CARLOSBOSS_WALK12
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK12
SpriteName = CRBS
SpriteFrame = E
Duration = 2
Next = S_CARLOSBOSS_WALK13
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK13
SpriteName = CRBS
SpriteFrame = F
Duration = 2
Next = S_CARLOSBOSS_WALK14
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK14
SpriteName = CRBS
SpriteFrame = G
Duration = 2
Next = S_CARLOSBOSS_WALK15
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK15
SpriteName = CRBS
SpriteFrame = H
Duration = 2
Next = S_CARLOSBOSS_WALK16
Action = A_Chase
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_WALK16
SpriteName = CRBS
SpriteFrame = I
Duration = 2
Next = S_CARLOSBOSS_JUMP1
Action = A_Chase
Var1 = 0
Var2 = 0

#Dodge (Jump)

State S_CARLOSBOSS_JUMP0
SpriteName = CRBS
SpriteFrame = J
Duration = 1
Next = S_CARLOSBOSS_JUMP1
Action = A_PlaySound
Var1 = sfx_BSJUMP
Var2 = 0

State S_CARLOSBOSS_JUMP1
SpriteName = CRBS
SpriteFrame = J
Duration = 1
Next = S_CARLOSBOSS_JUMP2
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_JUMP2
SpriteName = CRBS
SpriteFrame = J
Duration = 8
Next = S_CARLOSBOSS_FALL
Action = A_BunnyHop
Var1 = 14
Var2 = 6

#Fall

State S_CARLOSBOSS_FALL
SpriteName = CRBS
SpriteFrame = K
Duration = 46
Next = S_CARLOSBOSS_STOPJUMPING
Var1 = 0
Var2 = 0

#Stop Jumping

State S_CARLOSBOSS_STOPJUMPING
SpriteName = CRBS
SpriteFrame = A
Action = A_FaceTarget
Duration = 30
Next = S_CARLOSBOSS_SPINATK1
Var1 = 0
Var2 = 0

#Spin Attack Charging

State S_CARLOSBOSS_SPINATK1
SpriteName = BSPN
SpriteFrame = A
Duration = 2
Next = S_CARLOSBOSS_SPINATK2
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK2
SpriteName = BSPN
SpriteFrame = B
Duration = 2
Next = S_CARLOSBOSS_SPINATK3
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK3
SpriteName = BSPN
SpriteFrame = C
Duration = 2
Next = S_CARLOSBOSS_SPINATK4
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK4
SpriteName = BSPN
SpriteFrame = D
Duration = 2
Next = S_CARLOSBOSS_SPINATK5
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK5
SpriteName = BSPN
SpriteFrame = A
Duration = 1
Next = S_CARLOSBOSS_SPINATK6
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK6
SpriteName = BSPN
SpriteFrame = B
Duration = 1
Next = S_CARLOSBOSS_SPINATK7
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK7
SpriteName = BSPN
SpriteFrame = C
Duration = 1
Next = S_CARLOSBOSS_SPINATK8
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_SPINATK8
SpriteName = BSPN
SpriteFrame = D
Duration = 1
Next = S_CARLOSBOSS_ROLLING1
Action = A_FaceTarget
Var1 = 0
Var2 = 0

#Spin Attack GO!

State S_CARLOSBOSS_ROLLING0
SpriteName = CRBS
SpriteFrame = N
Duration = 1
Next = S_CARLOSBOSS_ROLLING1
Action = A_PlaySound
Var1 = sfx_BSROLL
Var2 = 0

State S_CARLOSBOSS_ROLLING1
SpriteName = CRBS
SpriteFrame = N
Duration = 2
Next = S_CARLOSBOSS_ROLLING2
Action = A_BunnyHop
Var1 = 0
Var2 = 49

State S_CARLOSBOSS_ROLLING2
SpriteName = CRBS
SpriteFrame = O
Duration = 2
Next = S_CARLOSBOSS_ROLLING3
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_ROLLING3
SpriteName = CRBS
SpriteFrame = P
Duration = 2
Next = S_CARLOSBOSS_ROLLING4
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_ROLLING4
SpriteName = CRBS
SpriteFrame = Q
Duration = 2
Next = S_CARLOSBOSS_ROLLING5
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_ROLLING5
SpriteName = CRBS
SpriteFrame = N
Duration = 2
Next = S_CARLOSBOSS_ROLLING6
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_ROLLING6
SpriteName = CRBS
SpriteFrame = O
Duration = 2
Next = S_CARLOSBOSS_ROLLING7
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_ROLLING7
SpriteName = CRBS
SpriteFrame = P
Duration = 2
Next = S_CARLOSBOSS_ROLLING8
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_ROLLING8
SpriteName = CRBS
SpriteFrame = Q
Duration = 2
Next = S_CARLOSBOSS_SWORDATK
Var1 = 0
Var2 = 0

#Pain States

State S_CARLOSBOSS_PAIN1
SpriteName = CRBS
SpriteFrame = L
Duration = 1
Next = S_CARLOSBOSS_PAIN2
Action = A_SetObjectFlags
Var1 = MF_SHOOTABLE|MF_BOSS
Var2 = 1

State S_CARLOSBOSS_PAIN2
SpriteName = CRBS
SpriteFrame = L
Duration = 1
Next = S_CARLOSBOSS_PAIN3
Action = A_PlaySound
Var1 = 0
Var2 = 0

State S_CARLOSBOSS_PAIN3
SpriteName = CRBS
SpriteFrame = L
Duration = 17
Next = S_CARLOSBOSS_PAIN4
Action = A_BunnyHop
Var1 = 0
Var2 = -16

State S_CARLOSBOSS_PAIN4
SpriteName = CRBS
SpriteFrame = L
Duration = 1
NEXT = S_CARLOSBOSS_WALK1
Action = A_SetObjectFlags
Var1 = MF_SHOOTABLE|MF_BOSS
Var2 = 2

#Death State

State S_CARLOSBOSS_DEAD
SpriteName = CRBS
SpriteFrame = M
Duration = 1
NEXT = S_CARLOSBOSS_DEAD
Var1 = 0
Var2 = 0

#Carlos Sword ATK

State S_CARLOSBOSS_SWORDATK0
SpriteName = BATK
SpriteFrame = A
Duration = 1
NEXT = S_CARLOSBOSS_SWORDATK
Action = A_PlaySound
Var1 = sfx_ngskid
Var2 = 0

State S_CARLOSBOSS_SWORDATK
SpriteName = BATK
SpriteFrame = A
Duration = 15
NEXT = S_CARLOSBOSS_STOP
Action = A_BunnyHop
Var1 = 0
Var2 = 40

#Carlos Stop Attacking

State S_CARLOSBOSS_STOP
SpriteName = CRBS
SpriteFrame = A
Duration = 80
NEXT = S_CARLOSBOSS_WALK1
Var1 = 0
Var2 = 0
And this is the gif:

__________________
"The more detail that I put in the sprite, means the effort that I put into it."
-CG7244- is offline   Reply With Quote
Old 09-01-2016   #2
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Try removing MF2_FRET with A_SetObjectFlags2? That's the flag that causes flashing and pain immunity for bosses. Normally it would auto-turn off when you go back to the spawn state, but it seems you never do so you may as well remove it manually.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record. Also, it's pronounced "Yes-tin".
Monster Iestyn is offline   Reply With Quote
Old 09-01-2016   #3
-CG7244-
Sometimes I sprite "things"
 
-CG7244-'s Avatar
Default

Quote:
Originally Posted by Monster Iestyn View Post
Try removing MF2_FRET with A_SetObjectFlags2? That's the flag that causes flashing and pain immunity for bosses. Normally it would auto-turn off when you go back to the spawn state, but it seems you never do so you may as well remove it manually.
I think that requires another pain state to do that. :I

---------- Post added at 04:57 PM ---------- Previous post was at 04:51 PM ----------

IT WORKS! Thanks Monster Iestyn.
__________________
"The more detail that I put in the sprite, means the effort that I put into it."
-CG7244- 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 04:41 PM.


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