License from €75 Log in
DE EN FR ES IT CZ

Stopping a mouse button from moving the main character

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 13 years ago
    Hi,
    I'm struggling a bit with an automated feature in the engine whereby any left or right mouse click causes the player character to move to that point. My game uses a command setup where left click activates the current command, and right click cycles to the next command.
    Ideally, I want to have the left click only move the character, and right click not impact the movement at all. For the time being I've made it so that right clicking stops the character, which works to an extent, but makes the character stop if you try and change commands while walking to a destination. The other solution which I may try next would be to wrap the "stop character" action part in a "wait until character has stopped" action part. This would let the player keep moving, but would presumably also alter their course. Is there any other way to achieve what I'm looking for?
    Thanks!
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 13 years ago
    I was speaking to David about this the other day, as it's something I would like to see too. I don't know if it will get implemented or not mind.

    What you are asking for, could probably be achieved with a couple small lua scripts. I can't think of how off the top of my head though.
  4. · 13 years ago
    Hmmm, I guess another feature to look forward to :p
    I tried to use scripting a tiny bit a while back, but couldn't get it working. It seems like the move command precedes when the script itself would be called by registering it to the right click mouse event. My best guess would be to have the script first check the character state if moving. If they are, set the CharacterDestination to a cached value from the last left click, and if they aren't setting the state to 0 or calling an action to stop the character?
    If the movement precedes the character though, that won't be of much help. One thing I didn't try previously though is executing the same script from the right click mouse properties in the engine, which does in fact seem to precede the move command. I'll try that next.
    Thanks,
    -Ben
  5. · 13 years ago
    I was more thinking along the lines of getting the destination/command/item in the left click, setting a condition to true if one of the available destination commands are set & false on character stop or reach destination. & then using if query in right to check if condition true & if it is then make it carry on with what it was already doing.

    Like I said though: I'm not sure how, yet...

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?