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 


Small feature request.
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
Jeffrey_
Expert Cheater
Reputation: 1

Joined: 10 Jun 2011
Posts: 162

PostPosted: Fri Feb 17, 2017 9:43 am    Post subject: Small feature request. Reply with quote

Dark Byte could you perhaps add new hold button hotkeys for enabling/disabling scripts and Freeze/Unfreeze values into the next version of Cheat Engine? Would be appreciated! Smile
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 65

Joined: 29 Oct 2010
Posts: 3279

PostPosted: Fri Feb 17, 2017 10:06 am    Post subject: Reply with quote

Just to clarify, you mean, hotkey is activated on a timer? So, cheat will only activate if key/button is held for a certain amount of time?

If so, I think that would be a good idea, especially when mapping hotkeys for gaming controllers. You can set up a script to do this, but having it built-in would be very convenient.
Back to top
View user's profile Send private message
Jeffrey_
Expert Cheater
Reputation: 1

Joined: 10 Jun 2011
Posts: 162

PostPosted: Fri Feb 17, 2017 10:12 am    Post subject: Reply with quote

To clarify what I meant is that the cheat is only active when the hotkey is held down.

Your suggestion is good too! I could see that coming in handy in certain applications especially controllers.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 65

Joined: 29 Oct 2010
Posts: 3279

PostPosted: Fri Feb 17, 2017 10:22 am    Post subject: Reply with quote

Oh, I see. Yes, that's a great idea, too! Usually, I have to write scripts to achieve this. This definitely needs to be added, in my opinion.
Back to top
View user's profile Send private message
SunBeam
I post too much
Reputation: 61

Joined: 25 Feb 2005
Posts: 3962
Location: Romania

PostPosted: Fri Feb 17, 2017 10:53 am    Post subject: Reply with quote

Problem with adding various user-requested stuff is it will break other functionality and transform CE into bloatware.
_________________
More stuff on sb.deviatted.com. Work in progress.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 65

Joined: 29 Oct 2010
Posts: 3279

PostPosted: Fri Feb 17, 2017 1:34 pm    Post subject: Reply with quote

In this case, I think adding a conditional checkbox for toggle should be fairly straightforward, but I can only speculate. Very Happy

Truthfully, this is not needed for those that know how to set it up already, since setting up simple, conditional triggers is easy enough with scripting, but this would just make things easier and quicker for things like on-the-fly-type cheats such as speedhack. As opposed to writing up a script to set up an 'off' condition or using additional hotkeys, being able to control speed with a single controller button is appealing (e.g. using scope/aim controller button to trigger speedhack so that the game automatically slows down while aiming and automatically returns to normal speed when you stop aiming etc.). This can be set up inside of a script, but being able to do it quickly with a simple hotkey toggle would be cool.

I guess it's definitely not needed, but it could be useful in some cases and especially for newbies. Mr. Green
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 321

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

PostPosted: Fri Feb 17, 2017 2:58 pm    Post subject: Reply with quote

as for speedhack, that one already has an option to disable when the hotkey is released

for table entries not sure. i'll think about it. (as stated you can already do that with lua)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 65

Joined: 29 Oct 2010
Posts: 3279

PostPosted: Fri Feb 17, 2017 3:06 pm    Post subject: Reply with quote

Dark Byte wrote:
as for speedhack, that one already has an option to disable when the hotkey is released
-Are you referring to accessing speedhack by way of LUA or CE hotkeys or something else? This is news to me.

Thanks.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 321

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

PostPosted: Fri Feb 17, 2017 3:09 pm    Post subject: Reply with quote

settings->hotkeys
there the predefined speedhack hotkeys can be given an option to disable on release

(if i don't forget ,and not too complex, i may add an extended createHotkey lua function that lets you specify a release function)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 65

Joined: 29 Oct 2010
Posts: 3279

PostPosted: Fri Feb 17, 2017 3:13 pm    Post subject: Reply with quote

Ah. Okay. I have never made use of those particular commands, so I was not aware of the additional options. That's nice!

The 'on release' option could not be carried over to a trainer without additional code, presumably?

EDIT:
Okay. No worries! Setting up a simple script in assembly is easy enough, should you decide to scrap the idea. Very Happy

EDIT:
If you do decide to add something, it would be good to allow for control over values being set and not just toggle entries (e.g. hotkey while pressed sets value to X, and on release, sets value to Y).
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 136

Joined: 07 Nov 2008
Posts: 3977
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Feb 17, 2017 5:54 pm    Post subject: Reply with quote

Some time ago someone asked for "non-repetitive hotkey". Now Jeffrey_ is asking for "disable-when-released hotkey".


Code:
function createDisableWhenReleasedHotkey(func1, func2, ...)
  local getTickCount=getTickCount
  local lastTickCount=0
  local timer=createTimer(nil,false)

  local function changedBehaviour(sender)
    local TC = getTickCount()

    --call func1 and start timer
    if not timer.Enabled then func1(sender); timer.Enabled = true
    --else, reset timer when elap is less than 200ms
    elseif (TC - lastTickCount)<200 then
      timer.Enabled = false
      timer.Enabled = true
    end

    lastTickCount = TC
  end

  local hk = createHotkey(changedBehaviour, ...)
  hk.DelayBetweenActivate = 10

  timer.Interval=200
  timer.OnTimer = function (t) t.Enabled = false; func2(hk) end

  return hk
end



Usage:
Code:
getMRByDesc = getAddressList().getMemoryRecordByDescription
memoryrecord = getMRByDesc('testing')

function hotkey2Pressed()
  memoryrecord.Active=true
end

function hotkey2Released()
  memoryrecord.Active=false
end

hotkey2 = createDisableWhenReleasedHotkey(hotkey2Pressed, hotkey2Released, VK_F2)

_________________


Last edited by mgr.inz.Player on Fri Feb 17, 2017 5:57 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Zanzer
I post too much
Reputation: 112

Joined: 09 Jun 2013
Posts: 3128

PostPosted: Fri Feb 17, 2017 5:55 pm    Post subject: Reply with quote

Code:
function mycheat_enable()
  getAddressList().getMemoryRecordByDescription("My Cheat").Active = true
end

function mycheat_disable()
  getAddressList().getMemoryRecordByDescription("My Cheat").Active = false
end

if mytimer then
  mytimer.Destroy()
end
mytimer = createTimer(nil, false)
mytimer.Interval = 100
mytimer.OnTimer = function(timer)
  if mytoggle then
    if not isKeyPressed(VK_J) then
      mycheat_disable()
      mytoggle = false
      timer.Enabled = false
    end
  else
    timer.Enabled = false
  end
end

if myhotkey then
  myhotkey.Destroy()
end
myhotkey = createHotkey(function()
  if not mytoggle then
    mycheat_enable()
    mytoggle = true
    mytimer.Enabled = true
  end
end, VK_J)
Back to top
View user's profile Send private message
SunBeam
I post too much
Reputation: 61

Joined: 25 Feb 2005
Posts: 3962
Location: Romania

PostPosted: Fri Feb 17, 2017 9:51 pm    Post subject: Reply with quote

Woah there, guys. Don't step on each other's LUAs Smile
_________________
More stuff on sb.deviatted.com. Work in progress.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 136

Joined: 07 Nov 2008
Posts: 3977
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Feb 18, 2017 3:57 am    Post subject: Reply with quote

It's Lua, not LUA Twisted Evil

https://www.lua.org/about.html wrote:
Please do not write it as "LUA", which is both ugly and confusing

_________________
Back to top
View user's profile Send private message MSN Messenger
DaSpamer
Grandmaster Cheater Supreme
Reputation: 22

Joined: 13 Sep 2011
Posts: 1378

PostPosted: Sat Feb 18, 2017 3:59 am    Post subject: Reply with quote

Any chance you could modify Canvas's draw function to accept transparency in the next build?
_________________
www.flashacking.net/
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message Visit poster's website
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