Considering we have ActorIterator which is TID based, and ThinkerIterator which can be based on stat numbers, which is technically more superior for searching?
ActorIterator's limitation is that it cannot search thinkers so naturally STAT_ numbers separated would be better for that. But in case I don't actually have a need to search for raw thinkers, which would be better to separate by?
This is assuming I'm going to have large clusterfucks of entities that will be doing specific searches quite often for dangerous projectiles like grenades and rockets, running away from them the moment they detect one. They could number in the thousands, so the most efficient and sane searches would be preferred.
ZScript: Stats vs TIDs?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
- Lead GZDoom+Raze Developer
- Posts: 47994
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript: Stats vs TIDs?
These are totally different things. Statnums are mainly for ordering thinkers, not for searching for them. There have been a handful of exceptions for purely internal purposes.
If you look closely, all regular actors on the map are in STAT_DEFAULT and that's where they should remain. If you need advanced search logic beyond what tids offer, create your own lists.
If you look closely, all regular actors on the map are in STAT_DEFAULT and that's where they should remain. If you need advanced search logic beyond what tids offer, create your own lists.
-
- Posts: 8059
- Joined: Sun Jan 28, 2007 3:55 pm
Re: ZScript: Stats vs TIDs?
Right, which is why I was curious about making my own numbers, especially since ActorIterator cannot iterate through thinkers themselves. So I could just do a STAT_EFFECT = 43 for example and use that.
Unless I misinterpreted what you meant by 'lists' to mean something else?
Unless I misinterpreted what you meant by 'lists' to mean something else?