Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Triggerbot for 2d Game
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 9:15 pm    Post subject: Triggerbot for 2d Game Reply with quote

Is this possible? I have all the coordinates and (I think) I have the stuff that is needed, (but I am almost completely new to CE). I'm just not sure how I would do something like this, since no one else has done it before it seems.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 07, 2016 9:30 pm    Post subject: Reply with quote

It's possible. People have done it. The approach would depend on the game.
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 9:55 pm    Post subject: Reply with quote

++METHOS wrote:
It's possible. People have done it. The approach would depend on the game.

The game pictures are in the attachments to this reply. It involves hitting a ball like dodgeball, what I want is to be able to make a triggerbot so that when the ball gets in range of my attack's hitbox, it will auto attack the ball.



ss+(2016-04-07+at+11.04.43).jpg
 Description:
Example in-game.
 Filesize:  292.72 KB
 Viewed:  9407 Time(s)

ss+(2016-04-07+at+11.04.43).jpg



ss+(2016-04-07+at+11.04.18).png
 Description:
Title screen.
 Filesize:  112.12 KB
 Viewed:  9407 Time(s)

ss+(2016-04-07+at+11.04.18).png


Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 07, 2016 10:18 pm    Post subject: Reply with quote

Okay.
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 10:25 pm    Post subject: Reply with quote

++METHOS wrote:
Okay.

If I already have the coordinates for the ball and my character, how would I incorporate it into a table? (very sorry if this is incovenient to you, I just have simple knowledge of CE)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 07, 2016 10:35 pm    Post subject: Reply with quote

Is this how you usually ask people for help?

Anyway, you're question leads to more questions. You say that you have the coordinates, but you want to add them to your table? So, just add them to your table.

Based on what you've written, though, I'd say that you're going about this the wrong way.
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 10:57 pm    Post subject: Reply with quote

Okay, basically I have no clue how i'd go about making a triggerbot for this game, so i was wondering if I could ask for help.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 07, 2016 11:14 pm    Post subject: Reply with quote

Complete the CE tutorial if you really want to learn how to do this. If you're just wanting someone to do it for you, create a thread in the request sub-forum.

Aside from that, based on what you've written, it would make more sense to forget about the coordinates and instead look for the check that determines if the ball is in attack range as well as the instruction that handles the attack sequence (or key press/button press) so that you can automate it if/when the ball is in range.

If, on the other hand, you're wanting to be able to control the ball's location, then you'll need to find the coordinates for it. You say you've found the coordinates, but you haven't explained how. If they're not in your table...where are they? Did you search for them? If you searched for them, did you use an AOB signature that someone gave you, or did you manually find them yourself?

Tip:
If you're going to search for the check that determines if the ball is in attack range, use the speedhack feature to slow down the process.


Last edited by ++METHOS on Thu Apr 07, 2016 11:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 11:18 pm    Post subject: Reply with quote

++METHOS wrote:
Complete the CE tutorial if you really want to learn how to do this. If you're just wanting someone to do it for you, create a thread in the request sub-forum.

Aside from that, based on what you've written, it would make more sense to forget about the coordinates and instead look for the check that determines if the ball is in attack range as well as the instruction that handles the attack sequence (or key press/button press) so that you can automate it if/when the ball is in range.

If, on the other hand, you're wanting to be able to control the ball's location, then you'll need to find the coordinates for it.


Ok, so, right now I have already done the CE tut. I have the char. coords, ball coords, and i've got my inputs hook. What would i do now?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 07, 2016 11:29 pm    Post subject: Reply with quote

Sigh. You say you're new to CE, yet you've completed the tutorial? You see how this information would have saved us both time? And now you tell me that you've hooked the instruction that handles input? Awesome waste of my time. Thanks.

Anyway, good luck with your problem. I'm so tired of helping people without manners, that don't even bother to say thanks or consider others, and just expect to be helped, like they are entitled to it. Besides that, it's a pain to have to ask you questions just to get information out of you because you refuse to provide it...I don't like having to do all of the work.
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 11:38 pm    Post subject: Reply with quote

++METHOS wrote:
Sigh. You say you're new to CE, yet you've completed the tutorial? You see how this information would have saved us both time? And now you tell me that you've hooked the instruction that handles input? Awesome waste of my time. Thanks.

Anyway, good luck with your problem. I'm so tired of helping people without manners, that don't even bother to say thanks or consider others, and just expect to be helped, like they are entitled to it. Besides that, it's a pain to have to ask you questions just to get information out of you because you refuse to provide it...I don't like having to do all of the work.


I never meant to act unmannered at all, it's quite hard to create emotions using only words, but I truly appreciate you even trying to help at all, not just acting this out, it's genuine, I will ask someone else if you don't want to go through the trouble of asking back and forth (not in a sarcastic way, and not in a way to make you help me again, it's your choice of course Smile).
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 07, 2016 11:49 pm    Post subject: Reply with quote

I appreciate you saying that. And, you're welcome. I stand by what I said before...you're going to have to find a check that determines if the ball is in attack range. If not, you'll have to write a more complicated script that checks ball coordinates relative to player coordinates.
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Thu Apr 07, 2016 11:59 pm    Post subject: Reply with quote

++METHOS wrote:
I appreciate you saying that. And, you're welcome. I stand by what I said before...you're going to have to find a check that determines if the ball is in attack range. If not, you'll have to write a more complicated script that checks ball coordinates relative to player coordinates.


Checked and there is no check for that because the hitbox doesn't go out until you actually start to attack. How would I check the ball coords relative to player coords? Would I have to make a scan to keep checking If ball is in attack hitbox range?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Fri Apr 08, 2016 9:45 am    Post subject: Reply with quote

Writer's block in programming is pretty common for beginners. You've already done the first step: generally define your goal. Now, you should more specifically define your goal in terms of how a programmer should think about it. Namely, what's the value of the ball's coordinates and the player's coordinates when the ball should be hit? This leads us to a question you asked:
microsoftv wrote:
How would I check the ball coords relative to player coords?

Coordinates are just numbers. If you want to know how far away one number is from another, subtract them. For example, if the player's coordinates is (5,7) and the ball's coordinates is (4,7), then the ball is 1 unit away from the player. Of course, this is assuming the ball's coordinates and the player's coordinates are both relative to the same point.

Another question you should ask yourself concerns the player's orientation: how do you make sure the player is facing towards the ball? The ball could be in attack range, but if the player is facing in the opposite direction, then you won't hit it. Start scanning for some value you can use to check (preferably change) the player's orientation in-game.

Once you've specifically defined your goal, you can start listing all the fundamental values you'll need to accomplish it. In this case, all you need is the player's coordinates, the ball's coordinates, and the player's orientation: two of which you already have.

After you have all the values you need, you can start programming. It sometimes helps to first use pseudo-code to get a basic layout of the logical structure you'll need to make. Having knowledge of any higher-level programming language is helpful. In this case, it could look something like this:
Code:
dx = ballX - playerX;
dy = ballY - playerY;
if (dx < 2 and dx > 0 and dy < 1 and dy > -1 and isFacingLeft) {
  hitLeft();
}
elseif (dx < 0 and dx > -2 and dy < 1 and dy > -1 and isFacingRight) {
  hitRight();
}

Mapping out pseudo-code like this can also help raise other questions you may not have thought about. For example, how do you hit the ball? Simulating a keypress may be the easiest way, but calling the subroutine that hits the ball would probably be the most direct way. You should be able to easily find that subroutine using Ultimap.

After you've solved all the problems you can think of in your pseudo-code, start translating that into whatever language you're using.


If you'd like further assistance, answering these questions could help us help you:

What kind of a reference do you have to the player's coordinates and the ball's coordinates (e.g. pointers, registered symbols, registers in the hook, etc.)?
What is your injection point? How often is it run? Does it run outside of a match? Does it access multiple addresses?
Do you want to do this in asm or Lua?

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Fri Apr 08, 2016 10:18 am    Post subject: Reply with quote

ParkourPenguin wrote:
What kind of a reference do you have to the player's coordinates and the ball's coordinates (e.g. pointers, registered symbols, registers in the hook, etc.)?
What is your injection point? How often is it run? Does it run outside of a match? Does it access multiple addresses?
Do you want to do this in asm or Lua?


I have pointers and registers in the hook.
My injection point occurs when checking or enabling the ball poos hook, therefore allowing checking and changing of coordinates of the ball.
It runs every 1 frame. It does not run outside a match because it requires access to the ball object. It only accesses one address that points to ball coordinates, but when searching for the coords it may give you multiple addresses, but there is only one parent address.
I have so far began making it in lua, but I am not very knowledgable at all when it comes to lua, so I am learning it. I have also figured out it isn't so simple at to just a regular trigger swing/attack when ball in hit box range, I also require angular prediction and triangular prediction which was introduced by a friend of mine on the site shown in the Dog picture's description.



image.jpeg
 Description:
http://stackoverflow.com/questions/99353/how-to-test-if-a-line-segment-intersects-an-axis-aligned-rectange-in-2d/293052#293052
 Filesize:  88.83 KB
 Viewed:  9230 Time(s)

image.jpeg


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites