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.

How do I a perfect forcefield?

Postby AtomicLugia » Sat Dec 09, 2017 1:24 pm

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 allExpand view
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?
User avatar
A cyan Yoshi with a M249
Joined: 06 Oct 2016
Location: Germany

Re: How do I a perfect forcefield?

Postby Blue Shadow » Sat Dec 09, 2017 6:10 pm

AtomicLugia wrote:the autoaim is targeting it (and it's not a monster)

Set the NOTAUTOAIMED flag on forcefield actor.
User avatar
Blue Shadow
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Return to Scripting

Who is online

Users browsing this forum: spforce and 0 guests