#NPC thing

1 messages · Page 1 of 1 (latest)

proven cave
#

Threading this because there's multiple conversations

normal steppe
#

Ah that's alright

proven cave
#

You've got a few options, you can either have all the npcs add themselves to a list, and whenever you target them you just iterate through the list

normal steppe
#

Then for starters, the system works like this:

  • There is a "current target" variable which is 1 enemy at a time
  • The function tries to access all TargetPoints of a given area (Like arm, head, leg, etc)
#

I don't need to find the NPC actually, I have that down and it works well enough. My problem is that I want to get all the components of a specific to be accessed without relying on a For Each loop

proven cave
#

I guess I'm having a hard time understanding what it is you're trying to do

#

components as in like, actor components?

normal steppe
#

Lets say I want to get all components of X class, with a specific variable value on the Enum

normal steppe
proven cave
#

what does the enum do?

normal steppe
#

2 things, controls what type of damage the player deals, and checks for a different area of the body to target

#

So if the head is blocked out of view, the player would not be able to target it

proven cave
#

for loop shouldn't be that expensive if you're only running through like 6 things lizThink

#

what sets the area type?

normal steppe
#

It's a variable set when added to the actor, and currently nothing else changes it

normal steppe
proven cave
#

for loops are kind of how you crawl through lists

#

do you have a consistent amount of limbs/areas?

#

I think for loop is your best option here at my knowledge level

normal steppe
#

My other idea was to instead have 1 class for each enum value

#

So I could get specifically all those components of said classes