Cutscene simulating gameplay

Started by rmonic79, Thu 29/01/2015 19:23:52

Previous topic - Next topic

rmonic79

Hello guys i wanna do something like MI1 governor's house selecting actions and objects automatically  and even moving the cursor around. Is it possible?

Retro Wolf

#1
You could make a character with the exact same sprite as the cursor, then have it "walk" to wherever you want it to on the screen.
You might run into problems if the "cursor" needs to "click" on the GUI, you would have to do something fancy with drawing the sprite over the GUI (or have a fake duplicate GUI?).

Someone will probably come along with a better idea though.

Snarky

#2
The other thing you can do is to move the actual mouse cursor around with Mouse.SetPosition(). But you have to make sure the user can't interfere by providing input with the real mouse. I think if you use Mouse.SetBounds() so the mouse can't move from the position you specify (you'll have to update it whenever you want to move the cursor, of course), and put a test in the click-handling code to ignore any mouseclicks while you're in "playback mode", that should do it.

Doing it with a character is probably easier, unless you need to do GUI/inventory stuff and your UI has a lot of complicated scripting that is difficult to simulate.

rmonic79


SMF spam blocked by CleanTalk