Duke4.net Forums: BOSS amelioration and problems - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

BOSS amelioration and problems  "Sizeat, animations and more"

#1

Good evening everyone ! It will finally be my first thread in the right section.

I improved the bosses so that they have a complete code. However, I have some improvements that I can not properly define. I will start with the sizeat value.

I activated the stayput animation for boss2, 3 and 4 and I have a big problem.

I removed the sizeat value from the useractor and set the automatic size with EVENT_LOADACTOR.

The "bossstayput", big or small, can not keep the respective size. Normal bosses work well.

I tested four methods!

FOR THE CLASSIC BOSS

1. Automated sizeat (40 40) with the original sizeat value (80 80) for the "useractor enemy"
2. BOSS2 : the size 80 80 is kept.
3. BOSS2STAYPUT : size is not retained ; small, he becomes tall.

1. Automated sizeat (40 40) without the original sizeat value (80 80) for the "useractor enemy"
2. BOSS2 : same result!
3. BOSS2STAYPUT : same result, but reversed ; he remains small, without becoming tall.

----

FOR THE MINI-BOSS

1. Automated sizeat (40 40) with the original sizeat value (80 80) for the "useractor enemy"
2. BOSS2 : the size 80 80 is not retained.
3. BOSS2STAYPUT : same result!

- The two animations of BOSS2, become big again.

1. Automated sizeat (40 40) without the original sizeat value (80 80) for the "useractor enemy"
2. BOSS2 : It's good !
3. BOSS2STAYPUT : It's good !

- This is the logical result.

For the classic BOSS2STAYPUT, you have to find a way to keep it big.

This post has been edited by leninjableu: 18 October 2018 - 12:20 PM

0

User is online   Trooper Dan 

  • Duke Plus Developer
  • 3,198

#2

In addition to LOADACTOR, sizes should be set once when the actor becomes active. That means in the block of code where it says ifai 0 { ...

All you need is something like ifspritepal 0 sizeat 80 80 else sizeat 40 40

The only time size should be changing after that is due to the shrinker, so just make sure that they grow to the correct sizes after being shrunk. That's really all there is to it. If you are messing with size anywhere else then you are doing it wrong.
0

#3

Thank you I will test that.

I will continue with the animation. The boss2 in general, does not advance when he sees the player. He remains stuck on the spot.

And second, I'd like the stayput mini-boss to activate the progress animation first, before they attack the player. The classic bosses already do it very well. These are only boss 2 and 3.

Basically, they go first in the direction of the player, and after only they attack

This post has been edited by leninjableu: 18 October 2018 - 01:23 PM

0

#4

For size here is the code:

}
ifai 0
{
ifspritepal 0
ai AIBOSS2RUNENEMY
else
{
ifspritepal 22 nullop
else
strength 1000
sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
clipdist 16
}
}

I place this "sizeat 80 80 else sizeat 40 40" below or next to "ifspritepal 0" ? I have not been able to correctly set the code.
0

User is online   Trooper Dan 

  • Duke Plus Developer
  • 3,198

#5

ifai 0
{
     ifspritepal 0
     {
          ai AIBOSS2RUNENEMY
          sizeat 80 80 // unnecessary but harmless
     }
     else
     {
          ai AIBOSS2SHOOTENEMY
          sound BOS2_ATTACK
          sizeat 40 40
          clipdist 64
          ifn sprite[].pal 22 strength 1000
     }
}

0

#6

I tested the code you gave me, it does not work. Should I remove the code "EVENT_LOADACTOR"? Should I add the size in "actor" and "useractor"?

The BOSS2 STAYPUT does not keep its defined size.

I send the BOSS2 code

https://www.sendspace.com/file/trc6n6
0

#7

Hi TD! I tested the code you gave me again, it did not solve my problem. That's what I chose as an option, for the size of BOSS2:

appendevent EVENT_LOADACTOR
ifactor BOSS2STAYPUT
{
sizeat 40 40
}
endevent

The classic BOSS2 STAYPUT, will not be used in my game. That's all for sizes. Thanks to you !

Now, I will have to tackle three other small details.

1. The classic BOSS2 does not move towards the player. He stays there.
2. How to activate the direct movement after an attack ? I would like to assign this option only for BOSS STAYPUT.
3. avoid attacking action, when the enemy is narrowed. "ifai AIBOSS2PALSHRINK break" I do not know where to put this code.

Other improvements for BOSS (which I forgot to add):

1. Possibility of being killed by expander.
2. Ability to be destroyed directly, with the RPG and the HITRADIUS.
3. Adding more guts (as the BOSS are big, so it makes sense).
4. Quote "die son of a bitch" adapted for some kills.

This post has been edited by leninjableu: 19 October 2018 - 11:38 AM

0

#8

Resuming my coding work, the bosses received improvements.

1. Larger flame (BURNING2) when they explode on expander which of course adds the possibility of killing them with.
2. Added actions, to improve the animation.

The problems already mentioned have still not been resolved.
0

User is online   Trooper Dan 

  • Duke Plus Developer
  • 3,198

#9

View PostFirefly_Trooper, on 19 October 2018 - 11:11 AM, said:

1. The classic BOSS2 does not move towards the player. He stays there.


That is a feature original to the game. Pal 0 BOSS2 can only move on sectors which have a lotag of 3. You can avoid this problem easily by not using pal 0 -- just make your BOSS2 pal 3 or some other color.
0

#10

I added "ifspritepal 3" in the file and now, I find myself with a new BOSS2, with two different actions depending on the choice. Thank you Dan.

Regarding the mini-boss stayput who attack first, instead of moving, is it the same procedure ? With the value "pal 3" for a mini-boss stayput, it does not move the first time.

This post has been edited by Firefly_Trooper: 10 November 2018 - 06:05 AM

0

#11

Just two things to improve. Ability to move first, the BOSS with a value "pal 3" the pal 22 used, will be the opposite action: it will attack first.

Ability to create a larger "BLOODPOOL" sprite, for a BOSS. Is "sizeto" valid ?

define BOSS2DEADSPRITE 2758

action ABOSS2STAND        0  1  5
action ABOSS2WALK        0  4  5  1  30
action ABOSS2FROZEN        0  1  5
action ABOSS2RUN         0  4  5  1  15
action ABOSS2SHOOT         20 2  5  1  15
action ABOSS2LOB         30 2  5  1  105
action ABOSS2DYING        40 8  1  1  35
action ABOSS2FLINTCH      40 1  1  1  1
action ABOSS2DEAD         48
action ABOSS2GROW         0

move PALBOSS2SHRUNKRUNVELS 32
move PALBOSS2RUNVELS 84
move BOSS2WALKVELS 192
move BOSS2RUNVELS 256
move BOSS2STOPPED

ai AIBOSS2SEEKENEMY ABOSS2WALK BOSS2WALKVELS seekplayer
ai AIBOSS2RUNENEMY ABOSS2RUN BOSS2RUNVELS faceplayer
ai AIBOSS2SHOOTENEMY ABOSS2SHOOT BOSS2STOPPED faceplayer
ai AIBOSS2LOBBED ABOSS2LOB BOSS2STOPPED faceplayer
ai AIBOSS2DYING ABOSS2DYING BOSS2STOPPED faceplayer
ai AIBOSS2PALSHRINK ABOSS2WALK PALBOSS2SHRUNKRUNVELS furthestdir
ai AIBOSS2GROW ABOSS2GROW BOSS2STOPPED faceplayerslow

state boss2growstate
  ifcount 32
  {
    state standard_jibs
    state standard_jibs
    state standard_jibs
    state standard_jibs
    addkills 1
    sound SQUISHED
    sound PIPEBOMB_EXPLODE
    hitradius 2048 60 70 80 90
    spawn BLOODPOOL
    spawn EXPLOSION2
    spawn BURNING2
    killit
  }
  else
  {
    sizeto MAXXSTRETCH MAXYSTRETCH
    break
  }
ends

state boss2palshrunkstate
  ifcount SHRUNKDONECOUNT
    ai AIBOSS2SEEKENEMY
  else
    ifcount SHRUNKCOUNT
      sizeto 40 40
  else
    state genericshrunkcode
ends

state checkboss2seekstate
  ai AIBOSS2SEEKENEMY
  ifspritepal 0 nullop
  else   // a fake way of doing a ifspritepal NOT.
  ifspritepal 3 nullop
  else
  ifspritepal 22 nullop
    else
    move PALBOSS2RUNVELS seekplayer
ends

state boss2runenemystate
  ifcansee
  {
    ifactioncount 3
    {
      ifcanshoottarget
      {
        resetactioncount
        sound BOS1_WALK
      }
      else
        ai AIBOSS2SEEKENEMY
    }
    ifcount 48
      ifrnd 2
    {
      ifp palive
      {
        sound BOS2_ATTACK
        ai AIBOSS2SHOOTENEMY
      }
      break
    }
  }
  else
    ai AIBOSS2SEEKENEMY
ends

state boss2seekenemystate
  ifrnd 2
    soundonce BOS2_ROAM
  else
    ifactioncount 3
  {
    resetactioncount
    sound BOS1_WALK
  }

  ifcansee
    ifcount 32
      ifp palive
        ifrnd 48
          ifcanshoottarget
  {
    ifrnd 64
      ifpdistg 4096
    {
      ai AIBOSS2RUNENEMY
      ifspritepal 0 nullop
      else
        ifspritepal 3 nullop
      else
        ifspritepal 22 nullop
        else
        move PALBOSS2RUNVELS seekplayer
      break
    }

    ifpdistl 10240
    {
      ifrnd 128
      {
        sound BOS2_ATTACK
        ai AIBOSS2LOBBED
      }
    }
    else
    {
      sound BOS2_ATTACK
      ai AIBOSS2SHOOTENEMY
    }
  }
ends

state boss2dyingstate
  ifaction ABOSS2DEAD
  {
    ifspritepal 0
      break
    ifspritepal 3
      break
    ifspritepal 22
      break
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkboss2seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        state standard_jibs
        state standard_jibs
        state standard_jibs
        killit
      }
      break
    }
  }
  ifactioncount 8
  {
    iffloordistl 8
      sound THUD0
    action ABOSS2DEAD
    cstat 0
    ifspritepal 0
      endofgame 52
  }
ends

state boss2lobbedstate
  ifcansee
  {
    ifactioncount 2
      resetactioncount
    else
      ifactioncount 1
    {
      ifrnd 128
        shoot COOLEXPLOSION1
    }
    else
      ifcount 64
        ifrnd 16
          state checkboss2seekstate
  }
  else
    state checkboss2seekstate
ends

state boss2shootenemy
  ifcount 72
    state checkboss2seekstate
  else
    ifaction ABOSS2SHOOT
      ifactioncount 2
  {
    shoot RPG
    resetactioncount
  }
ends

state checkboss2hitstate
  ifrnd 2
    spawn BLOODPOOL
  ifdead
  {
    ifspritepal 0
      globalsound DUKE_TALKTOBOSSFALL
    else
    ifspritepal 3
      globalsound DUKE_TALKTOBOSSFALL
    else
    ifspritepal 22
      globalsound DUKE_TALKTOBOSSFALL
    else
    {
      ifrnd 64
        globalsound DUKE_TALKTOBOSSFALL
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS2FROZEN
        strength 0
        break
      }
    }

    ifwasweapon GROWSPARK
    {
      sound ACTOR_GROWING
      ai AIBOSS2GROW
      break
    }

    ifwasweapon RADIUSEXPLOSION
    {
      sound SQUISHED
      globalsound DUKE_TALKTOBOSSFALL
      state standard_jibs
      state standard_jibs
      state standard_jibs
      state standard_jibs
      killit
    }
    else
      ifwasweapon RPG
    {
      sound SQUISHED
      globalsound DUKE_TALKTOBOSSFALL
      state standard_jibs
      state standard_jibs
      state standard_jibs
      state standard_jibs
      killit
    }

    sound BOS2_DYING

    addkills 1
    ai AIBOSS2DYING
  }
  else
  {
    ifrnd 144
    {
      ifrnd 32
      {
        action ABOSS2FLINTCH
        move 0
      }
      else
      {
        sound BOS2_ATTACK
        ai AIBOSS2SHOOTENEMY
      }
    }

    ifspritepal 0 nullop
    else
    ifspritepal 3 nullop
    else
    ifspritepal 22 nullop
    else
      ifwasweapon SHRINKSPARK
    {
      sound ACTOR_SHRINKING
      ai AIBOSS2PALSHRINK
      break
    }
    else
      ifwasweapon GROWSPARK
        sound EXPANDERHIT
    else

    soundonce BOS2_PAIN

    debris SCRAP1 1
    guts JIBS6 1
  }
ends

state boss2code

state checksquished
ifspritepal 0 nullop else

  ifaction ABOSS2FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS2SEEKENEMY
        getlastpal
    }
    else
      ifcount FROZENDRIPTIME
    {
      ifactioncount 26
      {
        spawn WATERDRIP
        resetactioncount
      }
    }

    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
      {
        strength 0
        break
      }
      addkills 1
      lotsofglass 30

      ifrnd 84
        spawn BLOODPOOL
      sound GLASS_BREAKING
      killit
    }
    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pkick
    break

    ifhitweapon
    {
      ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
  ifai 0
  {
    ifspritepal 0
      ai AIBOSS2RUNENEMY
    else
    {
      ifspritepal 3 nullop
    else
        strength 1000
      ai AIBOSS2RUNENEMY
      clipdist 16
    {
      ifspritepal 22 nullop
    else
        strength 1000
      ai AIBOSS2SHOOTENEMY
      clipdist 16
    }
    }
  }
  else
    ifaction ABOSS2FLINTCH
  {
    ifactioncount 3
      ai AIBOSS2SEEKENEMY
  }
  else
    ifai AIBOSS2SEEKENEMY
      state boss2seekenemystate
  else
    ifai AIBOSS2RUNENEMY
      state boss2runenemystate
  else
    ifai AIBOSS2SHOOTENEMY
      state boss2shootenemy
  else
    ifai AIBOSS2GROW
      state boss2growstate
  else
    ifai AIBOSS2LOBBED
      state boss2lobbedstate
  else
    ifai AIBOSS2PALSHRINK
      state boss2palshrunkstate
  ifai AIBOSS2DYING
    state boss2dyingstate
  else
  {
    ifhitweapon
      state checkboss2hitstate
    else
      ifp palive
        ifspritepal 0
          ifpdistl 1280
    {
      addphealth -1000
      palfrom 63 63
    }
    else
      ifp palive
        ifspritepal 3
          ifpdistl 1280
    {
      addphealth -1000
      palfrom 63 63
    }
    else
      ifp palive
        ifspritepal 22
          ifpdistl 1280
    {
      addphealth -1000
      palfrom 63 63
    }
  }
  ifhitweapon
    state checkboss2hitstate
  else
    state checksquished 
ends

useractor enemy BOSS2STAYPUT BOSS2STRENGTH cactor BOSS2 enda
actor BOSS2 BOSS2STRENGTH ABOSS2STAND fall state boss2code enda

useractor enemy BOSS2DEADSPRITE
  state checksquished
  cstat 0
  ifhitweapon
  {
  ifwasweapon RADIUSEXPLOSION
    state standard_jibs
    state standard_jibs
    state standard_jibs
    state standard_jibs
    sound SQUISHED
    killit
  }
enda

appendevent EVENT_LOADACTOR
  ifactor BOSS2STAYPUT
  {
    sizeat 40 40
  }
  ifactor BOSS2DEADSPRITE // enemy corpse
  {
    sizeat 40 40
  }
endevent

appendevent EVENT_RECOGSOUND
  ifactor BOSS2
  {
    set RETURN -1
    globalsound BOS2_RECOG
  }
endevent

appendevent EVENT_SOUND
ife RETURN THUD
{
  ife sprite[].picnum BOSS2
  set RETURN THUD0
}
endevent

onevent EVENT_SPAWN // big bloodpool for BOSS2
  switch sprite[THISACTOR].picnum
  case BLOODPOOL
  ifspawnedby BOSS2
  sizeto 60 60
  break
  endswitch
endevent

0

#12

I added "pal 3" in the code, but the BOSS still does not advance in first action. He attacks first, as for the "pal 22" I used before. Using the "pal 3" the corpse can not be jibed.



This post has been edited by Firefly_Trooper: 13 November 2018 - 05:53 AM

0

User is online   Mark 

  • Honored Donor
  • 2,699

#13

corpse can't be killed because of wrong cstat
useractor enemy BOSS2DEADSPRITE
state checksquished
cstat 0
ifhitweapon
{
ifwasweapon RADIUSEXPLOSION
state standard_jibs
state standard_jibs
state standard_jibs
state standard_jibs
sound SQUISHED
killit
}
enda
0

#14

How is this possible? This code worked very well.
0

#15

106/5000
The code "spritepal 3" must be added how many times in the code? I added it next to "pal 0"
0

#16

I am sure I have misused the code "pal 3" it must be misplaced or it must be used several times unnecessarily.
0

#17

It's is correct ?

state checkboss2seekstate
  ai AIBOSS2SEEKENEMY
  ifspritepal 0 nullop
  else   // a fake way of doing a ifspritepal NOT.
  ifspritepal 3 nullop
  else
  ifspritepal 22 nullop
    else
    move PALBOSS2RUNVELS seekplayer
ends


Do I have to put the same code each time there is "pal 0" and "pal 22" ?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options