Jump to content

11 posts in this topic

Recommended Posts

Posted

Have a field in a class called Labyrinth:

List<EnemyInstance> BattleZoneEnemy; // 0x98


Wants to use this function but need an EnemyInstance:

kill( Labyrinth *this, EnemyInstance enemy);



How can I determine the size of enemy so I can iterate BattleZoneEnemy list so I can call Kill() on each of the enemyinstances 

What I am thinking :

void Update(void *_LabyrinthInstance) {
	// get BattleZoneEnemy (Not sure what are the data type to receive I assume a pointer since its a list)
	void* BattleZoneEnemy = *(void*)((uint64_t)_LabyrinthInstance + 0x98);
	if (BattleZoneEnemy) {
    		kill(_LabyrinthInstance, BattleZoneEnemy + size? ); // Can I loop this statement if I know the size of each EnemyInstance?
      									// So I would just add the size for each iteration
   	 }
}



Some advices would be appreciated!

Posted (edited)

@bR34Krmay know. I also curious

Updated by Laxus
Posted

You can use unity functions 

void* EnemyInstance = *(void**)((uint64_t)this_ + 0x98);

int count = List.getCount(EnemyInstance);

for(int i = 0; i < 0; i++){
 void* enemies = List.getItem(EnemyInstance, i); // now you have your enemies object

//do what ever you want

}
 

Posted
21 minutes ago, X204 said:

You can use unity functions 

void* EnemyInstance = *(void**)((uint64_t)this_ + 0x98);

int count = List.getCount(EnemyInstance);

for(int i = 0; i < 0; i++){
 void* enemies = List.getItem(EnemyInstance, i); // now you have your enemies object

//do what ever you want

}
 

How should I include/import unity's function to the tweak?

Posted

Call the function 

Posted

Are you kidding  🤐,  Copy and past! I gave you example try to understand the main idea, and declare what you want before trying to call it.

Posted
8 minutes ago, X204 said:

Are you kidding  🤐,  Copy and past! I gave you example try to understand the main idea, and declare what you want before trying to call it.

Yep, understood now 

Posted
4 minutes ago, BenGorr said:

Yep, understood now 

👍🏻

Posted
On 3/5/2022 at 3:07 PM, BenGorr said:

Have a field in a class called Labyrinth:

List<EnemyInstance> BattleZoneEnemy; // 0x98


Wants to use this function but need an EnemyInstance:

kill( Labyrinth *this, EnemyInstance enemy);



How can I determine the size of enemy so I can iterate BattleZoneEnemy list so I can call Kill() on each of the enemyinstances 

What I am thinking :

void Update(void *_LabyrinthInstance) {
	// get BattleZoneEnemy (Not sure what are the data type to receive I assume a pointer since its a list)
	void* BattleZoneEnemy = *(void*)((uint64_t)_LabyrinthInstance + 0x98);
	if (BattleZoneEnemy) {
    		kill(_LabyrinthInstance, BattleZoneEnemy + size? ); // Can I loop this statement if I know the size of each EnemyInstance?
      									// So I would just add the size for each iteration
   	 }
}



Some advices would be appreciated!

You discord I’d ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines