I did a search on this and found nothing and have tried a lot of different triggers and nothing works. If I do get movement disabled it is at the price of taking off attacking enemies and picking up items with right-click as well and I don't want to lose those two things. Does anyone have a way that simply takes walking off of right-click but does not hinder attacking and picking up items? Or a way to just make it where a player can't simply click on the other side of a wall to get the game to auto walk there for him.
None.
You might be able to do this through detecting the right click and stopping the move order. It will really only work if you have a couple units per player though.
None.
Yeah I made a trigger for that with rightclick being pressed down. But I could not get it to only do movement and not alter attacking and item pick up. Unless there is a way I didn't try?
None.
I'm going to assume that the mouse click event will happen before an order event. So you would set a boolean variable in the mouse click trigger. In another trigger with an order (move) event have a condition that checks to see if the boolean is true.
Edit: It is probably just better to check the units order's through the Unit Order function to check to see if the unit has a move order in it's queue
None.
Just wondering: the FPS maps we see around have it disabled.
Could it be because they've managed to kind of unselect the main hero?
None.
How would I go about checking the move order? I don't know a lot of things about the editor yet other then what I have taught myself and can't save I have come across a move order and not sure on the whole boolean thing.
I tried the boolean thing but I have never done it before so I am sure I am way off.
player rightclick
Events
UI - Player 1 clicks Right mouse button Down.
Local Variables
movement = false <Boolean>
Conditions
Actions
player rightclick 2
Events
Unit - Any Unit uses Move at Generic1 - Any stage (Ignore shared abilities)
Local Variables
Conditions
movement == true
Actions
movement = true <Boolean>
None.
Just wondering: the FPS maps we see around have it disabled.
Could it be because they've managed to kind of unselect the main hero?
I believe the main difference is this trigger:
Camera - Lock camera mouse relative mode On for player Counter
Which actually hides the mouse cursor, preventing any selection input. Essentially, yeah, it's because most of the times the unit is not selected. Even if it were, if that were turned on, it wouldn't register any mouse clicks.
None.
Yeah I use a combination of the relative mode on my left click but while its good and all for hiding the cursor it also makes it so I can't attack or pick up items so im back in the same crappy boat as before.
None.
Can you gives us a little bit more information on this? It sounds like you've created a FPS, or something similar, but still want to be able to pick up items and attack people using the right click, but not have it move if neither of the above two are valid?
None.
Its actually a dungeon crawler type game. Every stage is going to be a labyrinth and it kind of defeats the purpose of it if they can just click on the other side of a wall and let the unit auto run though it. I really don't want it to move at all but if that can't be done with keeping attacking and item pickup I can deal with just making it so the unit can't path though the whole thing at all but I have yet to find how to do that...if that can be done.
I have done a trigger that looked something like this
event - player 1 rightclicks down
if - player uses ability move
then - make player stop
else - dont stop...or w/e that was
but it sadly you "move" to items and enemies so it didn't work.
None.
It is possible to get the x,y,z position of the mouse on click. It could be possible to check to see if that position is within sight range of the unit, and if it is, then issue the command. From there you could check to see if an item existed close by, and attempt to pick it up if it was by making the move command target it.
It would look something like
Event
-Player press right mouse button
Local Variable
-ClickedPoint
Actions
-Set ClickPoint to MouseX, MouseY, MouseZ
-If (Distance Between ClickedPoint and Position of Unit < Unit Sight Range)
-Then
-Move Region to ClickedPoint
-If (At least 1 Item exists in Region)
-Order Unit to Move Targetting Item
-IElse
-Order Unit to Move to ClickedPoint
-Else
-Wait .01 Seconds
-Order Unit to Stop
It's very rough, and depends on if we detect items inside of regions, and even them if targetting move an item through a trigger will pick it up.
None.
Sight range would not work very well. Being up against a wall you would not be able to see the other side but your range would extend there anyway.
None.
Is there no way to just make it so the unit wouldn't just walk though the whole thing? Normally if there is not a way to the point clicked the unit just does nothing.
None.
Have you tried removing the Move ability from the unit in the Data Editor? I don't know how you will make it move after that but I just tried it and still moves to pick up items when you right click them and still moves to attack a target when you right click them.
Just a thought.
~TheFreak.
None.
Removing the move ability stops the unit from being able to move. As far as I know there is no other way to let a unit move (except triggers).
The only way I see to do this is implement your own pathing via triggers. Would be very difficult but possible to do.
None.
Sight range would not work very well. Being up against a wall you would not be able to see the other side but your range would extend there anyway.
I was hoping there might be a way to detect if the area is visible or not, but I didn't see any actions for it. Was hoping someone might be able to extend upon it.
None.
Alright so I went into the editor and started trying some stuff out.
I came up with this. This will cancel your move order unless it was issued at a position that is currently visible to the player. So if you are next to a wall but you can still see the other side of it then you will still move to it as pointed out before. No matter how far you have to go around it or whatever it will still move there (or try, if there is no connecting path).

For this to work, whoever player you set to be the owner of the created "dummy" unit can't have shared vision with the same player you want this trigger to apply to. in my example player 0 is neutral and is not allied with anyone so it works.
Also note, this happens so fast that even if you could see the unit spawning somehow you wouldn't actually see the "dummy" unit. if you want to make sure it is never seen then you can make it be a cloaked unit or something.
Hope this is what you need.
~TheFreak
None.
You can actually make units with no models or with no draw flag checked, that would work really well.
None.
Yeah you could do as Temp suggests, it will probably even make it more efficient. Also, I would suggest some sight blockers on top of the walls unless it goes against the design of your map.
~TheFreak
None.
Alright so I went into the editor and started trying some stuff out.
I came up with this. This will cancel your move order unless it was issued at a position that is currently visible to the player. So if you are next to a wall but you can still see the other side of it then you will still move to it as pointed out before. No matter how far you have to go around it or whatever it will still move there (or try, if there is no connecting path).

For this to work, whoever player you set to be the owner of the created "dummy" unit can't have shared vision with the same player you want this trigger to apply to. in my example player 0 is neutral and is not allied with anyone so it works.
Also note, this happens so fast that even if you could see the unit spawning somehow you wouldn't actually see the "dummy" unit. if you want to make sure it is never seen then you can make it be a cloaked unit or something.
Hope this is what you need.
~TheFreak
Very innovative, wouldn't have thought of that.
No draw flag will probably be above no model, sometimes certain things will still render as a small sphere if they have no associated model.
None.