#I got this error with Dummies

1 messages · Page 1 of 1 (latest)

pallid phoenix
#

I get this error when I came close to dummy
Idk everything works normal...

#

I used this to spawn

            Player dummy = Player.Get(DummyUtils.SpawnDummy("Front Man"));

            dummy.SetRole(PlayerRoles.RoleTypeId.ChaosConscript);
            Item FrontManRevolver = dummy.AddItem(ItemType.GunRevolver);
            dummy.CurrentItem = FrontManRevolver;

            dummy.Position = new Vector3(14.188f, 295.381f, -7.906f);
            dummy.Rotation = Quaternion.LookRotation(new Vector3(90f, 0f, 0f));
summer fable
#

does this happen before round starts? if yes, it'll be fixed next update

pallid phoenix
#

No I spawn him after round starts

summer fable
#

try waiting a frame before setting the current item

#

inventory is always sent a frame after modifying

pallid phoenix
#

Oh okay can you say how to do it? 😭 Idk

summer fable
#

Timing.CallDelayed(0, () => player.CurrentItem = item)

pallid phoenix
#

Ty

summer fable
#

np

pallid phoenix
#

Oh intresting is thats not problem with that inventory,. When I click anything in RA After that it will pop up

#

when I removed
dummy.SetRole(PlayerRoles.RoleTypeId.ChaosConscript);
It stopped

summer fable
#

maybe delay that oo

pallid phoenix
#

Yep everything fixed

#

Thank you very much

tough lynx
#

@pallid phoenix you only need a one frame delay

summer fable
#

Timing.CallDelayed(0) effectively does that

harsh lynx
#

not a breaking bug

#

just annoying error when spawning dummies before round start

pallid phoenix
#

Yes