Here is an example I posted in the old forums that some may find useful. This example is for FarCry and will set the HP of every enemy mob in the zone to zero. First, we need to find a unique value found in each entity object ("mob"). The unique value in this example is a pointer to a vtable but it could be anything. Once we know a unique value, we scan for this value and create an array of the addresses containing this value. Then, we iterate through this array and use offsets relative to our found address to create variables that are more convenient for us to use. We then modify these variables or do whatever operations we want on our instance of this entity object. In some cases, you may need to "skip" certain instances that we do not want to modify (e.g. PCs, friendly mobs, etc).
Find and iterate through list of objects.
Find and iterate through list of objects.
Code: [show] | [select all]