How to specify Bump to Interact or A to Interact for different Sprites

How can I make the game check if the config.autoAct value should be set to 0 or 1 before interacting with a sprite. Currently I have config.autoAct set to 0 when the game starts, and the following script added to the player.

on confirm do
act
end

Is there a way to change the config.autoAct value to 1 depending on which sprite the player is about to interact with? I suppose I could surround a sprite with tiles that would change the config.autoAct value but there must be an simpler way. Ideally any chests, signs or NPC would require A to interact, and enemies would require a bump to interact. Any help would be great.

I would keep autoact on and use a variable to track when interacting with the A button. Something like this:

Player script:

on confirm do
  acting = 1
  act
  acting = 0
end

NPC sprite script:

on interact do
  if acting==1 then
    // code that only runs on interacting by pressing A
  end
end

Enemy sprite script:

on interact do
  if acting==0 then
    // code that only runs on interacting by bump
  end
end

Thanks so much! That did the trick.