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 


how to beep on memory record activate?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Thu Mar 08, 2012 2:18 am    Post subject: how to beep on memory record activate? Reply with quote

Code:
addresslist = getAddressList()
description= [[( D ) Remove Food from market. Option 37]]
memoryrec = addresslist_getMemoryRecordByDescription(addresslist, description)
memoryrecord_onActivate(memoryrec, beeping)

function beeping()
beep()
beep()
beep()
end


I use this code and my game crashes?

I want to make a beep sound when the memoryrecord is activated.
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Mar 08, 2012 3:45 am    Post subject: Reply with quote

At the time that memoryrecord_onActivate(memoryrec, beeping) is called "beeping" is not defined yet. Define the function first

About the game crashing and not ce, no idea

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Thu Mar 08, 2012 4:27 am    Post subject: Reply with quote

Is there anything like memoryrecord_setActive ?

Like I want to set memoryrecord within the lua engine.

And I have another problem. I had set a hotkey with the memory record. Before lua scripting it was working properly. But now after this lua script my hotkey is not working and even I am unable to select the cheat script manually using mouse?
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Mar 08, 2012 5:31 am    Post subject: Reply with quote

memoryrecord_freeze is what you need

About onActivate routine:
The function called takes 3 parameters (memoryrecord, before, currentstate), and is executed twice when clicked (once before activating, once after)

You must return true in that function

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
wzslrb
How do I cheat?
Reputation: 0

Joined: 10 Feb 2023
Posts: 2

PostPosted: Fri Feb 10, 2023 7:44 am    Post subject: Reply with quote

Try This
Code:

playSound(findTableFile('Activate'))
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 Lua Scripting 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