Shootable flag prevents teleport

Archive of the old editing forum
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.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Shootable flag prevents teleport

Post by DBThanatos »

Is it to be expected that an inventory item that is shootable, completely prevents (blocks) monsters from teleporting to a place where the item is located?

The code of the thing looks like this:

Code: Select all

ACTOR WeaponXPlaced : CustomInventory 
{
	radius 20
	height 28
	+SHOOTABLE
	+NOBLOOD
	+NODAMAGE
	+GHOST +NOBLOCKMONST
	+FLOORCLIP
	+INVENTORY.IGNORESKILL
	Scale 0.2
	Inventory.Amount 1
	Inventory.PickupMessage "Something."
	States
	{
	Spawn: 
		D013 P -1
		Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("WeaponX",1)
		TNT1 A 0 A_GiveInventory("AmmoX",2)
		Stop
	}
}
If I remove the shootable flag, then monsters can teleport just fine.

I kinda see it like a bug, but I wanted to ask if this is standard behavior and if you know a way around it
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Shootable flag prevents teleport

Post by Enjay »

I'm guessing that making it shootable makes it eligible for telefragging and so monsters won't telport into it. What happens if you set the MAPINFO flag that allows monsters to telefrag like on MAP30?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49143
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Shootable flag prevents teleport

Post by Graf Zahl »

Making it shootable won't prevent teleportation.
Making it shootable and non-damageable will. The teleport tries a telefrag - the item remains unharmed - the telefrag fails and the teleport does also.

A clear case of 'don't do that!'
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Shootable flag prevents teleport

Post by DBThanatos »

Ahh. So that's why.

Hacks start to come to my mind. Considering I need the thing to be shootable, but I dont want the thing to be destroyed, and I need monsters to teleport, I might as well just make it "telefrag-able", and as soon as that happens, it will kinda spawn itself again.

Time to make some experimentation.

EDIT:

Code: Select all

ACTOR WeaponXPlaced : CustomInventory
{
   radius 20
   height 28
   Health 2000
   +SHOOTABLE
   +NOBLOOD
   +FLOORCLIP
   +INVENTORY.IGNORESKILL
   Scale 0.2
   Inventory.Amount 1
   Inventory.PickupMessage "Something."
   States
   {
   Spawn:
      D013 P -1
      Loop
   Pickup:
      TNT1 A 0 A_GiveInventory("WeaponX",1)
      TNT1 A 0 A_GiveInventory("AmmoX",2)
      Stop
	Death:
		TNT1 A 0 A_SpawnItemEx("WeaponXPlaced",0,0,0,0,0,0,0,32)
		TNT1 A 1 A_PrintBold("I died")
		Stop
   }
}
Just tried this, and refuses to work with the teleportation. I can "kill" it, with MDK, prints the message and all. But in the teleport case, it still prevents the monsters from getting there.
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Shootable flag prevents teleport

Post by Enjay »

OK, this time does the "allowmonstertelefrags " MAPINFO flag make any difference?
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Shootable flag prevents teleport

Post by DBThanatos »

To be honest. I havent tried that. If Im not mistaken, that basically makes all monsters to be able to telefrag others. The thing is that this is a gameplay mod, and that would affect greatly the way the maps work. But in the other hand, preventing monsters from teleporting, is already affecting the map playability.

First I want to ensure if is possible to do what I need, and if not, then I might make indeed all monsters to be able to telefrag.
Gez
 
 
Posts: 17924
Joined: Fri Jul 06, 2007 3:22 pm

Re: Shootable flag prevents teleport

Post by Gez »

Monsters will only telefrag if they are allowed to telefrag; regardless of what is being telefragged -- fellow monsters, enemy players, weird-ass inventory items...
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: Shootable flag prevents teleport

Post by Xaser »

An inverse-TELESTOMP would be nice, I think. Some sort of "ALWAYSTELEFRAGGABLE" flag or somesuch.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Shootable flag prevents teleport

Post by DBThanatos »

Exactly. But unfortunately, as of right now, such thing doesnt exist. I cant really decide on what's better. Monsters that dont teleport or monsters that teleport and frag whatever.

Either case breaks traps, but it'd seem much more dangerous to have monsters telefragging the player.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space

Re: Shootable flag prevents teleport

Post by NeuralStunner »

If you're making your own maps, telefraggable players would make for an unusual source of challenge. (Of course, you need to add a mitigating factor to reduce frustration potential. I'm not sure what, though. At the least, try to clearly mark "unsafe" places where a monster could appear.)
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Shootable flag prevents teleport

Post by DBThanatos »

:(

That's the thing. There arent any maps. Is a gameplay mod. That's why Im struggling so bad deciding what's the lesser evil.
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Shootable flag prevents teleport

Post by Enjay »

If this is a gameplay mod, why is it spawning something at the location of a teleport exit? Have you made the teleport spot spawn items or something or is it just that you are trying to run the mod on a map where things have been placed on the teleport. If it's the former then I can see that being a problem. If it's the latter then I would just chalk it up as a map that is not compatible with the mod.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Shootable flag prevents teleport

Post by DBThanatos »

It's the latter. The inventory item applies for all the weapons (" replaces shotgun" and so on). Now, the issue Im having is that I cant just rule out as incompatible the maps that has this problem because, Doom2 Map03 suffers this. Doom E1M9 suffers this, and ruling out the two main mapsets is something I dont want to do :P And who knows how many more custom maps have this same type of teleporter destinations right where a weapon is.
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Shootable flag prevents teleport

Post by Enjay »

Hmmm... yes, now that you mention it, it's not such an unusual setup. :?
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: Shootable flag prevents teleport

Post by Xaser »

Indeed -- first thing that came to mind was making shootable weapon crates replace guns. And that would indeed break E1M9's monster teleporter, among other things.

I've filed a feature suggestion here. I'd take a look at the code myself but can't for a couple of days since I'm not on my primary PC.

Return to “Editing (Archive)”