#`point_template` resulting entity can only be found in vscript every other iteration

1 messages · Page 1 of 1 (latest)

full vault
#

I'm using vscript to activate a point_template that spawns a func_regenerate but it's only happening every other time and I'm not sure why. Any advice?

Code:

DoEntFire("regen_template", "ForceSpawn", "", 0, player, player)
local regen = Entities.FindByName(null, "template_regen_trigger")
if (!regen || !regen.IsValid()) return // failing this check half the time. `regen` is coming back null
// ... do stuff
#

also FWIW I was previously trying to create this via SpawnEntityFromTable but could never get it to show up in-game, probably because of the bbox not being set or something.

           local targetname = "regentest"
            local regen = SpawnEntityFromTable("func_regenerate", 
            {
                targetname = targetname,
                IsEnabled = true,
                solid = 2, 
                TeamNum = 2, 
                origin = "-7, -3498, 175",
                mins = "-16, -16, -16",
                maxs = "16, 16, 64",
            })
polar spire
#

you wont see it

#

debug via ent_bbox

#

or some actual inputs

full vault
#

ohh true. so I see the trigger's outline then, but it's still not doing anything

#

oh and that's because of TeamNum being wrong.. thx lol

polar spire
#

solid 3

#

collisiongroup 10