the monster tentatively named "pogthrower" is to encounter another object called pog and throw it at whoever it so pleases. Up to this point, the best way i could think to accomplish that was to use the arch-vile's raise method, which potentially you have seen done before. It is easy to do with a stationary object. In this case I want pog to be able to move around and also be shootable by the player (i also want pog to be gettable by the player but that is less important and a problem for later if ever).
My first attempt, making the pog "die" immediately and then walk around, spawning a separate object that looks like it is exploding if shot by the player didn't fool the game at all. although i had forgotten to give pogthrower vilechase frames at that point, but my experience with what i did later makes me think that still wouldn't work!
Another idea almost worked, having pog drop small, invisible objects (plorg) that "die" immediately and then can be raised by the pog thrower, which at the same time shoots a projectile that quickly removes pog from the ground before turning to face the player and seem to throw the pog.
However, the game only seems to consider a dead plorg a corpse once it stops animating, which either means they stay permanently on the ground and quickly outnumber the actual pogs or are removed from the game and therefore cannot be "raise"d at all.
Code: Select all
ACTOR pogthrower 500
{
[irrelevant stuff]
heal:
fope [ 8
fope \ 8
fope ] 0 A_SpawnProjectile ("pogremover", 8, 0, 0, 0, 0)
fope ] 0 a_facetarget
fope ] 8 A_SpawnProjectile ("cheappog", 48, 0, 0, 0, 0)
goto see
}
}
actor pogremover
{
projectile
speed 10
DamageType pogremoval
damage 1
states
{spawn:
tnt1 a 1
loop
}
}
actor trickpog 501
{
bloodtype organicpain
PainChance "pogremoval", 255
Radius 16
Height 40
Mass 100
Speed 8
Scale 1.0
Painchance 300
DeathSound "world/barrelx"
+SOLID
+SHOOTABLE
+ACTIVATEMCROSS
+DONTGIB
+NOICEDEATH
+OLDRADIUSDMG
health 20
states
{
spawn:
pogg a 10 a_look
goto see
see:
POGG b 4 a_chase
pogg b 0 A_SpawnItemEx ("plorg", 0, 0, 0, 0, 0, 0, 0)
POGG b 4 a_chase
pogg b 0 A_SpawnItemEx ("plorg", 0, 0, 0, 0, 0, 0, 0)
pogg c 4 a_chase
pogg c 0 A_SpawnItemEx ("plorg", 0, 0, 0, 0, 0, 0, 0)
pogg c 4 a_chase
pogg c 0 A_SpawnItemEx ("plorg", 0, 0, 0, 0, 0, 0, 0)
//it has a bunch of walking frames but i wasn't going to put them all in until i was sure this worked
loop
Melee:
POGG a 4 A_facetarget
GoTo See
pain:
POGG h 4
POGG h 4 a_pain
goto see
death:
pogg h 1 A_SpawnItemEx ("pogsplode", 0, 0, 0, 0, 0, 0, 0)
stop
pain.pogremoval:
pogg h 1
stop
}
}
actor plorg
{
+shootable
radius 0
height 0
mass 1
states
{
spawn:
tnt1 a 1
tnt1 a 1 a_die
stop
death:
tnt1 a 1
tnt1 a 1 a_fall
tnt1 aaaaaaaaaaaaaaaa 1
tnt1 a 1
// aaaaaaaaaaaaaaaa it doesn't work!
stop
raise:
tnt1 a 1
stop
}
}
do you know of a better way to accomplish this? Thank you and good luck.