[HELP]Lua Help

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
Wjb1001
Noobzor
Noobzor
Posts: 6
Joined: Tue Jun 02, 2020 5:56 am
Reputation: 0

[HELP]Lua Help

Post by Wjb1001 »

Within a game I have the player coordinate which are a float value, but I want to display those coordinates constantly on a cheat engine table. So is it possible to move that float value into a label constantly using a timer? And if so, how?

User avatar
Dread_Pony_Roberts
Table Makers
Table Makers
Posts: 522
Joined: Sun Dec 09, 2018 8:46 am
Reputation: 386

[HELP]Lua Help

Post by Dread_Pony_Roberts »

You don't need lua for this, you can make a pointer to the address and cheat engine will handle the rest.

Wjb1001
Noobzor
Noobzor
Posts: 6
Joined: Tue Jun 02, 2020 5:56 am
Reputation: 0

[HELP]Lua Help

Post by Wjb1001 »

I already scripted the pointers and have them, but I want to be able to display them on a cheat table constantly. So that I can see the coordinates on the same table that all the cheat toggle buttons are on.

User avatar
Dread_Pony_Roberts
Table Makers
Table Makers
Posts: 522
Joined: Sun Dec 09, 2018 8:46 am
Reputation: 386

[HELP]Lua Help

Post by Dread_Pony_Roberts »

You mean like this?



[IMG]https://i.stack.imgur.com/UoxPC.png[/IMG]

TimFun13
Expert Cheater
Expert Cheater
Posts: 1354
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 6

[HELP]Lua Help

Post by TimFun13 »

I think the mean on a trainer.



Cheat table is not the same as a trainer. And you'd be better off actually posting some of the code you have so far.



But here's some links to the CE wiki.

[URL unfurl="true"]https://wiki.cheatengine.org/index.php?title=Lua:Class:Timer[/URL]

[URL unfurl="true"]https://wiki.cheatengine.org/index.php?title=Lua:Class:Label[/URL]

Wjb1001
Noobzor
Noobzor
Posts: 6
Joined: Tue Jun 02, 2020 5:56 am
Reputation: 0

[HELP]Lua Help

Post by Wjb1001 »

Okay so I have these labels: CETrainer_1_CELabel13, CETrainer_1_CELabel14, and CETrainer_1_CELabel15.



What I'm trying to do is to have these labels display what each of the following pointer values are on a trainer.



The player Z cord pointer is [pPlayer44]+DC

The player X cord pointer is [pPlayer4]+0D8

The player Y cord pointer is [pPlayer42]+E0

GreenHouse
Expert Cheater
Expert Cheater
Posts: 855
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 891

[HELP]Lua Help

Post by GreenHouse »

Change the names accordingly, I don't know if those are correct, as they're just called CELabel and pPlayer.

[CODE=lua]if tmer == nil then

tmer = createTimer(nil, false)

end



tmer.OnTimer = function(tmer)

CETrainer1.CELabel13.Caption=readFloat("[pPlayer44]+DC")

CETrainer1.CELabel14.Caption=readFloat("[pPlayer4]+0D8")

CETrainer1.CELabel15.Caption=readFloat("[pPlayer42]+E0")

end



tmer.Interval = 100

tmer.Enabled = true[/CODE]

Wjb1001
Noobzor
Noobzor
Posts: 6
Joined: Tue Jun 02, 2020 5:56 am
Reputation: 0

[HELP]Lua Help

Post by Wjb1001 »

Thank you! That works. I appreciate the help.

Post Reply

Who is online

Users browsing this forum: No registered users