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 


Need help with making Combo boxes in Cheat Engine

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Reclaimer Shawn
Advanced Cheater
Reputation: 0

Joined: 09 Jun 2015
Posts: 77

PostPosted: Fri Jul 08, 2016 1:17 am    Post subject: Need help with making Combo boxes in Cheat Engine Reply with quote

Hello guys. I'm making a trainer for Resident Evil 5 Gold Edition, and I wanted to implement and inventory editor function. I want the game to write a value to an address depending on what item is selected, and whenever an item matches one on the list, based on the value, will have what item it is in that box. I have 122 indexes. Thanks in advanced
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Jul 08, 2016 6:15 am    Post subject: Reply with quote

Normally there is a game instruction that executes as soon as you mouse over an item.
Hook into that instruction to receive the "currently selected item" base address.
Setup all your script and hotkeys to utilize that base address.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 958

PostPosted: Fri Jul 08, 2016 12:05 pm    Post subject: Reply with quote

This Lua function combox should work like Memory Record's dropdown list.

Code:

combox(cb,kvTbl,writeValueFn,readValueFn,readInterval,fmt)

-- cb , the target ComboBox
-- kvTbl, a Lua table setup so that the Key is string of name/desc, and Value is something associate to that Key, both Key and Value should be unique, check 'test' script ;
-- writeValueFn, if defined, will be call when manually changed the ComboBox entry with a known value in kvTable, not call if Value cannot be found in kvTable;
-- readValueFn, if defined, will be called and get the Value by a Timer to update the selected item in the ComboBox, if the Value cannot be found, an Unknown Text (ItemIndex=0) is displayed;
-- readInterval, how fast the timer to update, default is 100 = 0.1 sec
-- fmt, how to format the text displayed by the ComboBox, there is a default one;

## the Timer pause update when mouse is move into the ComboBox ;

## the Tag field of the ComboBox is used to recall a Timer, if the Tag has another use, it may disable the other functionality, or just rise an error.

## adapt the parameters for your use.

bye~



_combox.CT
 Description:
may need copy function 'combox' into your script

Download
 Filename:  _combox.CT
 Filesize:  3.61 KB
 Downloaded:  371 Time(s)


_________________
- Retarded.
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
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