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 


Script to input sequence of values over time?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
Denizen38
How do I cheat?
Reputation: 0

Joined: 15 Sep 2023
Posts: 2

PostPosted: Fri Sep 15, 2023 6:14 am    Post subject: Script to input sequence of values over time? Reply with quote

Brand new to the forum so apologies if this is the wrong place or if I'm not following etiquette...

The title might be a bad description but I'll try to explain in more detail here.

I'm using the Hexington table for Elden Ring to manipulate which attacks an enemy can throw out. This is done by inputting the Anim. ID in the "Value" field for "Idle Animation", which then gets fed into the "Current Animation" row at the next opportunity. The Value of "Idle Animation" then resets to -1 once the animation has begun.

What I'd like to be able to do is feed an entire combo sequence into the "Idle Animation" field over time. So something like this (obviously have no idea what language or syntax would actually be used, just using to illustrate):

Set Value to 3016
Wait
If Value = -1, Then
Set Value to 3018
Wait
If Value = -1, Then
Set Value to 3023
Wait
If Value = -1, Then

I'm a complete noob with more advanced functionality of CE. I don't mind doing my own further reading, but I just need some recommendations for what literature to look at and where to start.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 150

Joined: 06 Jul 2014
Posts: 4654

PostPosted: Fri Sep 15, 2023 11:05 am    Post subject: Reply with quote

Use a timer
Code:
-- strings are what you'd enter into "Change Value" prompt
local values = {
  '3016',
  '3018',
  '3023',
}

if setAnimTimer then setAnimTimer.destroy(); setAnimTimer = nil end

local memrec = AddressList.getMemoryRecordByDescription'Idle Animation'
assert(memrec, 'Memory record does not exist')
local i = 1

setAnimTimer = createTimer()
setAnimTimer.OnTimer = function(t)
  if memrec.NumericalValue == -1 then
    memrec.Value = values[i]
    if i == #values then
      t.Enabled = false
    end
    i = i + 1
  end
end

_________________
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
Denizen38
How do I cheat?
Reputation: 0

Joined: 15 Sep 2023
Posts: 2

PostPosted: Fri Sep 15, 2023 11:12 am    Post subject: Reply with quote

Thank you so much for this! Will report back with some (hopefully) good news soon!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
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