Duke4.net Forums: Spawning an invisible corpse when stomping on an enemy - 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

Spawning an invisible corpse when stomping on an enemy  "Just as the title reads."

User is offline   Mav3r1ck 

#1

My experiments with GAME.CON have made some interesting results. For example I have adjusted the Assault Troopers code to spawn whenever you blow it up, freeze and break it (having some trouble with the pal) and expand it. My dilemma now is trying to find out how to have it spawn an invisible corpse when you shrink and squish it.

I'm doing what I can think of but to no avail. Would anyone with CON coding knowledge be able to assist me?

The goal is to have the monster spawn regardless of how you kill it.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#2

To prevent a sprite from being deleted by the "pstomp" command do this:

appendevent EVENT_KILLIT
  ife player[].actorsqu THISACTOR
  {
    set RETURN 1

    <rest of code>
  }
endevent

0

User is offline   Mav3r1ck 

#3

Thank you for the help. Another issue I've encountered is that when the monster I freeze respawns from the invisible corpse it's in a blue palette. How do I get it to revert to is previous palette before it was frozen?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#4

You use "getlastpal", it should get the last palette.
0

User is offline   Mav3r1ck 

#5

Thanks! And also, how can I shoot corpses with bullets instead of explosions?
0

User is online   Trooper Dan 

  • Duke Plus Developer

#6

You can use cstator 256 to set the bit for being shootable: https://wiki.eduke32.com/wiki/Cstator
0

User is offline   Mav3r1ck 

#7

So would I insert cstator 256 somewhere in this part of the code?

state boss3dyingstate
  ifaction ABOSS3DEAD
  {
    ifspritepal 0
      break
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      globalsound BOS3_RECOG
      state checkboss3seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        guts JIBS2 32
        guts JIBS3 32
        guts JIBS4 32
        guts JIBS5 64
        guts JIBS6 64
        debris SCRAP1 32
        debris SCRAP2 32
        debris SCRAP5 32
        ifrnd 6
          {
            guts JIBS1 8
            spawn BLOODPOOL
          }
        state jib_sounds
        killit
      }
      break
    }
  }
  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS3DEAD
    cstat 0
    ifspritepal 0
    endofgame 52
  }
ends

0

User is online   Trooper Dan 

  • Duke Plus Developer

#8

You should make corpse actors that are separate from the monster actors they spawn from, and apply the cstat to those new actors. There are a couple of good reasons for this, but the most obvious one is that the hittable area of an actor is determined by the tile number it is defined on, not on the frame it is displaying.
0

User is offline   Mav3r1ck 

#9

Perhaps I've been making this all too difficult. I'm guessing it would be better to use the examples in the GAME.CON for the Duke 64 mod by Fox.
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 Fury! ;) © 2019 Voidpoint, LLC

Enter your sign in name and password


Sign in options