Snayff / nqp3

1 stars 2 forks source link

Actor Stats Not Initing #25

Closed Snayff closed 1 year ago

Snayff commented 1 year ago

Describe the bug Actor Stats showing as 0

To Reproduce Steps to reproduce the behavior:

  1. Start game
  2. Set breakpoint on any line of an Action that uses _creator.stats.attack
  3. See error on break

Expected behavior Stats should be loaded from ref_data global.

Screenshots

image

image

image

Additional context Is there a reason only the first actor in each unit is called actor and the rest are @CharacterBody2D@[num]? Is this related? The node called "Actor" has proper stats. image

image

Snayff commented 1 year ago

During Factory.create_actor() the unit has the correct ActorStats. At some point after instnatiation and being added to the Unit._actors variable it is getting changed.