Pushing a Monster

Discuss all aspects related to modding Zandronum here.
Post Reply
BloodyAcid
Forum Regular
Posts: 294
Joined: Sat Jun 16, 2012 7:42 pm

Pushing a Monster

#1

Post by BloodyAcid » Thu Jul 12, 2012 1:05 am

Is there a function that I can apply to my weapon so that I can push a monster? For example, I shoot a slider block that pushes an imp against a wall to kill it.

A simpler one would be shooting a ball that hits and kills the monster, but also tosses the corpse away.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Pushing a Monster

#2

Post by Ænima » Thu Jul 12, 2012 2:11 am

Weapon.KickBack [amount]
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Pushing a Monster

#3

Post by Ijon Tichy » Thu Jul 12, 2012 3:37 am

or use A_RadiusThrust with a small radius

BloodyAcid
Forum Regular
Posts: 294
Joined: Sat Jun 16, 2012 7:42 pm

RE: Pushing a Monster

#4

Post by BloodyAcid » Thu Jul 12, 2012 4:05 am

Thanks Ænima and Tichy.

I have one last question: Is there anything I can do to make a projectile increase in size as it travels? (Besides having separate sprites that grow increasingly larger)

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Pushing a Monster

#5

Post by Ijon Tichy » Fri Jul 13, 2012 3:15 am

collision? no

you could see if A_SetScale is in for sprite resizing, but it probably isn't

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Pushing a Monster

#6

Post by ZzZombo » Fri Jul 13, 2012 3:51 am

You can constantly spawn bigger projectiles.

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

RE: Pushing a Monster

#7

Post by Catastrophe » Fri Jul 13, 2012 5:57 am

.
Last edited by Catastrophe on Fri May 11, 2018 7:48 pm, edited 1 time in total.

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Pushing a Monster

#8

Post by Ivan » Fri Jul 13, 2012 9:42 am

Catastrophe wrote: Yeah, you can spawn a projectile for one second, make it kill itself then spawn another one in its place that is a bit bigger.

...And keep going like that.
It won't properly work because you'll need to transfer the properties of all previous projectiles, such as pitch or owner. There is really no perfect way of doing what he wants currently.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Pushing a Monster

#9

Post by Ænima » Fri Jul 13, 2012 10:10 am

It seems like all he wants to do is change the sprite scale, not the hitbox.

You either have to open Photoshop/Gimp or wait for A_SetScale to be backported.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Pushing a Monster

#10

Post by Ivan » Fri Jul 13, 2012 11:03 am

Since he put "besides having separate sprites that grow increasingly larger" I assumed he wanted to get them to have bigger hitboxes on the way as well. Eitherway, you need to wait for it. If it's going to make you feel better, I already made a request for that on bugtracker some time ago.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Pushing a Monster

#11

Post by ZzZombo » Fri Jul 13, 2012 11:19 am

Ivan wrote: It won't properly work because you'll need to transfer the properties of all previous projectiles, such as pitch or owner. There is really no perfect way of doing what he wants currently.
Can't you check things you are speaking about right before to speak? A_CustomMissile() with CMF_TRACKOWNER|CMF_AIMDIRECTION in flags and pitch parameter set to pitch Decorate property is used to properly spawn missiles in missiles.
Last edited by ZzZombo on Fri Jul 13, 2012 11:20 am, edited 1 time in total.
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Pushing a Monster

#12

Post by Ivan » Fri Jul 13, 2012 11:32 am

Then I suppose you have a working example. Care to show ?
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Pushing a Monster

#13

Post by ZzZombo » Fri Jul 13, 2012 11:41 am

Naaah, havn't much time to do such useless things. All I said above is enough to do it youself.

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Pushing a Monster

#14

Post by Ivan » Fri Jul 13, 2012 12:08 pm

ZzZombo wrote: Naaah, havn't much time to do such useless things. All I said above is enough to do it youself.
So you say that's useless, that means helping people is useless. That means your posts in this thread and a couple others are useless. You should not even post then ... Great logic.
Last edited by Ivan on Fri Jul 13, 2012 12:09 pm, edited 1 time in total.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

XutaWoo
Forum Regular
Posts: 113
Joined: Mon Jun 04, 2012 7:04 am

RE: Pushing a Monster

#15

Post by XutaWoo » Fri Jul 13, 2012 5:39 pm

A_CustomMissile can't be used to fire a projectile with the same pitch as a previous projectile, mostly because projectiles aren't actually given pitches.

You'll have to wait for some A_SpawnItemEx flags to be backported before you can use the 'actor shoots other actors' method.
[spoiler]Image[/spoiler]
Image

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Pushing a Monster

#16

Post by ZzZombo » Sat Jul 14, 2012 12:48 am

Did YOU checked things before saying them? I have a project which abuses this function to spawn a bunch of missiles and it workx just as well as I can drink.

BloodyAcid
Forum Regular
Posts: 294
Joined: Sat Jun 16, 2012 7:42 pm

RE: Pushing a Monster

#17

Post by BloodyAcid » Sat Jul 14, 2012 5:42 am

Everything's waiting to be backported. Oh well, thanks for the replies. Guess it's time to add more sprites

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Pushing a Monster

#18

Post by ZzZombo » Sat Jul 14, 2012 6:17 am

HEY, don't ignore my posts! Check this:
[spoiler]

Code: Select all

actor CacoBomb
{
	Damage		100
	DeathSound	"caco/shotx"
	Height		20
	Mass		0xFFFFFFFF
	Obituary	"%o was squished by cacodemon huge balls."
	Radius		20
	Scale		3
	SeeSound	"caco/attack"
	Speed		5
	PROJECTILE
	-NOEXPLODEFLOOR
	States
	{
		Spawn:
		BAL2 A 2 A_RadiusThrust(4000,400)
		loop
		Death:
		BAL2 C 12
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,15,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,30,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,45,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,60,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,75,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,90,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,105,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,120,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,135,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,150,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,165,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,180,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,195,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,210,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,225,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,240,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,255,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,270,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,285,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,300,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,315,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,330,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("CacoBombProjectile",0,0,345,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		BAL2 DE 17
		stop
	}
}
actor BoomerangShot:Bite
{
	Damage		4
	DeathSound	"caco/shotx"
	Scale		1
	SeeSound	"caco/attack"
	Speed		20
	+BRIGHT
	+EXPLODEONWATER
	+NOBOSSRIP
	+NODAMAGETHRUST
	+RIPPER
	States
	{
		Spawn:
		BAL2 AB 1
		loop
		Crash:
		BAL2 A 1 A_CustomMissile("BoomerangShot",0,0,180+random(-20,20),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-15,15))
		stop
		Death:
		BAL2 A 1 A_CustomMissile("CacoBall",0,0,180,CMF_AIMDIRECTION|CMF_TRACKOWNER)
		stop
	}
}
actor CacoBombProjectile:BoomerangShot
{
	Alpha		1
	Damage		10
	Obituary	"%o was smashed by cacodemon."
	Radius		10
	RenderStyle	Normal
	Translation	Ice
	+BRIGHT
	+DONTREFLECT
	+FLOORHUGGER
	+EXTREMEDEATH
	+MOVEWITHSECTOR
	+RIPPER
	-NOBOSSRIP
}
[/spoiler]
I works as it should: missile CacoBomb spawns a bunch of smaller projectiles, what upon hitting an object will shot Cacoballs in reverse direction.

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

RE: Pushing a Monster

#19

Post by Catastrophe » Sat Jul 14, 2012 7:30 am

.
Last edited by Catastrophe on Fri May 11, 2018 7:48 pm, edited 1 time in total.

Synert
Forum Regular
Posts: 228
Joined: Mon Jun 04, 2012 12:54 pm
Contact:

RE: Pushing a Monster

#20

Post by Synert » Sat Jul 14, 2012 1:27 pm

I did something like this before, it was just a projectile with A_RadiusThrust on it and no damage. Dunno if it'll work perfectly for you, push it'll push them.

Post Reply