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.
Page 1 of 1
Spawning an invisible corpse when stomping on an enemy "Just as the title reads."
#1 Posted 25 September 2019 - 04:44 PM
#2 Posted 26 September 2019 - 02:42 PM
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
#3 Posted 26 September 2019 - 03:16 PM
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?
#5 Posted 28 September 2019 - 07:27 AM
Thanks! And also, how can I shoot corpses with bullets instead of explosions?
#6 Posted 28 September 2019 - 12:56 PM
You can use cstator 256 to set the bit for being shootable: https://wiki.eduke32.com/wiki/Cstator
#7 Posted 28 September 2019 - 05:32 PM
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
#8 Posted 28 September 2019 - 05:40 PM
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.
#9 Posted 28 September 2019 - 06:54 PM
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.
Share this topic:
Page 1 of 1