Not sure if i understand you correctly but if i do theres alot of ways to alter The variable, for example you can create 3 global variables, 1 called "plus" one called "minus" and The third called "volt".
Now use a invisible collision box for example a transparent Sprite, do two of them actually call 1 pluscol and 1 minuscol and place them where you want The drag and drop to check for collision. Minus goes where The minus is and plus one goes where plus is.
Create a instant variable on each collision Sprite, call it col and set it to 0.
Now you can use The is overlapping or on collision in the event sheet, i would click The minus col Sprite in the event sheet, and set to is overlapping another object (this object is The one you use The cable or whatever) if so then set instant variable to 1, then do another event that checks that instant variable, if col=1 then set plus(global variable) to 1, then do another event
That checks if system>global variable plus minus is both 1, if they are both 1 write text 12 v. The rest you Will figure out I can help you by showing it if you uoload2your project here, happy newyears