I've been trying to solve the final problem with my medic gun by trying to think of a solution for 5 minutes a day.
I eventually decided that A_CustomPunch with a custom bulletpuff that creates a pickup would be the best option, but because of ZDooms pickup behaviour, it wouldn't do anything unless the player being healed is moving.
To increase the chances of it getting picked up, I decided to give the invisible pickup with the properties of a homing projectile. What A_SeekerMissile parameters would be the best for something like this, and is there a way to guarantee that it'll home in on the actor that was hit by the punch? Also, if, say, a monster was hit by the punch, what would be a good amount of time before the projectile 'dies' so a player can't pick it up when the monster dies?
A_CustomPunch making a homing projectile pickup
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- DBThanatos
- Posts: 3101
- Joined: Fri Apr 14, 2006 3:17 pm
- Location: in "the darkness that lurks in our mind"
Re: A_CustomPunch making a homing projectile pickup
If i understand correctly, you are doing something like DE soulleech. The problem in that method is that the projectile (healer) wont "seek" you, because the puff in no way was aiming or targeting you.Ghastly_dragon wrote:I've been trying to solve the final problem with my medic gun by trying to think of a solution for 5 minutes a day.
I eventually decided that A_CustomPunch with a custom bulletpuff that creates a pickup would be the best option, but because of ZDooms pickup behaviour, it wouldn't do anything unless the player being healed is moving.
To increase the chances of it getting picked up, I decided to give the invisible pickup with the properties of a homing projectile. What A_SeekerMissile parameters would be the best for something like this, and is there a way to guarantee that it'll home in on the actor that was hit by the punch? Also, if, say, a monster was hit by the punch, what would be a good amount of time before the projectile 'dies' so a player can't pick it up when the monster dies?
however you could give the the weapon a custom damage, and to the monsters a custom pain state (with custom painstatechance) in which the monster itself will fire the healing "seeking" missile at you.
it is all theory
DBT
Code: Select all
actor gntpuff : BulletPuff
{
spawnid 131
renderstyle Translucent
alpha 0.5
+NOBLOCKMAP
+NOGRAVITY
+PUFFONACTORS
+NOBLOOD
+LOOKALLAROUND
seesound "weapon/gntpow"
states
{
Spawn:
PUF1 A 0 Bright A_spawnitem("gauntHealthGiver",0,0)
PUF1 ABCDE 2 bright
melee:
PUF1 A 0 Bright A_spawnitem("gauntHealthGiver",0,0)
PUF1 ABCDE 2 bright
stop
crash:
PUF1 ABCDE 2 bright
stop
}
}
ACTOR gauntHealthGiver
{
Radius 0
Height 1
Speed 0
PROJECTILE
RENDERSTYLE NONE
+LOOKALLAROUND
States
{
Spawn:
NULL A 0
NULL A 1 Bright A_Look
loop
See:
NULL A 0 Bright A_FaceTarget
NULL A 3 Bright A_GiveToTarget("Health",2)
NULL A 3 Bright
stop
}
}
