Add this code inside your Hero's "forever" loop.
Like this.
Now , if your Hero touches the Villain, it will be teleported to a random location.
There are many other things you could program the Hero to do when it touches the Villain. See if you can program your own ideas!