by Netjera » Wed Feb 17, 2010 7:19 pm
The code for moving Hotspot 2 is located in Hotspot 1, in case that wasn't clear. You place all the movement settings in the plugin tab of the hotspot BEING CLICKED.
Typical procedure works like this:
1) Select the hotspot you want to click on. For me, that's a small strip near the bottom of the screen that I want the player to move back and forth within.
2) Determine the hotspot you want to move. I don't want to move the strip, I want to move the player. When the strip is clicked, I want the player to move to the click position.
3) In the plugin properties of the hotspot BEING CLICKED, set up your parameters. You specify FIRST, what hotspot is being MOVED. Then all the settings indicated have to do with THAT HOTSPOT.
4) Since I told the plugin, "When Hotspot 1 is clicked, move hotspot 2" in the first parameter, it automatically looks at the current location of Hotspot 2 - which happens to be where I created it, since I haven't moved it - if I leave the Initial X Position blank. I set up Hotspot 2 at 25, 286, so that's the position it uses.
That's the breakdown on how the plugin works. You can move any hotspot from any other hotspot, which makes the plugin very versatile. Since you can run code after the moving the hotspot, you can do things like, Click Hotspot A to move Hotspot B, which runs code to click Hotspot C which causes Hotspot D to move, and so on. Cascading effects are really easy to set up. So far, I haven't had any issue with the plugin in other games.
I'm using Action.GetClickPosition, because I want the player to move back and forth within the strip, stopping at the click position. If you want an example, juhu posted a sample on page one of the thread, but he never told me how he managed it, and I couldn't access the code, so I've been working on it, on my own. However, his example is exactly how I want the movement to work.
A woman on a mission - a budding artist looking for a place to take root, a builder looking for the right community - I'm looking for a home.