How do I a perfect forcefield?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Posts: 36
Joined: Thu Oct 06, 2016 7:58 am
Location: Germany

How do I a perfect forcefield?

Post by AtomicLugia »

I'm recreating the ForceField from Unreal. I'ts almost like the original. It works but it has some issues. First, the autoaim is targeting it (and it's not a monster) and second, it can be placed at the same spot multiple times (even though that they're solid) via the inventory item.

Here's the DECORATE:

Code: Select all

Actor ALDM-ForceField : CustomInventory 31043
	Tag "Force Field"
	Inventory.Icon ARTIFFGN
	Inventory.PickupMessage "Picked up a force field generator."
	Inventory.PickupSound "Pickups/Inventory"
	Inventory.UseSound "ForceField/Use"
	Inventory.Amount 1
	Inventory.Maxamount 5
	Inventory.InterHubAmount 5
		FFGN ABCD 10 Bright
		TNT1 A 0 A_SpawnItemEx("ForceField",48,0,8,0,0,0)

Actor ForceField
	Game Doom
	Radius 16
	Height 56
	Speed 0
	RenderStyle Add
		FFLD A 0 Bright
		FFLD A 0 Bright A_PlaySoundEx("ForceField/Active","Weapon",1)
		FFLD ABC 7 Bright
		FFLD D 9 Bright
		FFLD E 7 Bright
		FFLD F 6 Bright
		FFLD G 7 Bright
		FFLD LMNO 4 Bright
Is there another way to make it block hitscan attacks without the +SHOOTABLE flag?
Blue Shadow
Posts: 4963
Joined: Sun Nov 14, 2010 12:59 am

Re: How do I a perfect forcefield?

Post by Blue Shadow »

AtomicLugia wrote:the autoaim is targeting it (and it's not a monster)
Set the [wiki=Actor_flags#NOTAUTOAIMED]NOTAUTOAIMED[/wiki] flag on forcefield actor.

Return to “Scripting”