I have two major problems holding my map back at this time. One is I want to have my hero un-selectable but to pick items up you must have the hero selected...is there any way to have my unit always selected but can not be moved by a right-click?
The next problem has to do with my character attack. I have it as a system I found in a guide but it does not seem to be the best system. What it does is have a region that appears where I rightclick but it does not seem to move as I click so my character moves but the point does not and the attack on it is random so even if I click on a enemy within the region that moved it may not attack the one I wanted. But I am fairly positive if there is a fix to my character select issue I can just make my character attack like normal but he cant move that way.
Main thing I really need at this time is just a way to turn off movement with right-clicking. I am fairly sure the whole turn off smartmove thing works but that also made it where I can't pick items up and I don't want that.
Shameless bump as this is the only problem I really have with my map at the moment...unless it does not fix the attack problem then well one out of two problems.
that would work just seems like there would be a way to just do it but I can live without it I guess. Still really want the no movement on right-click though :D
You're doing something weird and your inquiry is too vague to really understand what you're trying to do.
For not moving hero with right click: Disable your hero's ability to move at all, that is set the unit's Movement - fields inside the Unit Tab on the Data Editor to 0's, and also remove the Move ability. Then right clicking won't do anything regardless of selection. If you need a temporary lack of movement, create a hidden behavior (type: buff) with the Modification -> Modify Flags -> Suppress Movement option checked. Then remove/add this behavior as movement is needed. (Alternatively, Pause the unit via triggers).
As far as picking up items, I would suggest rewriting the item pick up system to be driven without the hero's interaction, or perhaps do a form of trigger pick up (manual), this isn't easy to explain though.
At the attacking part, that made absolutely no sense, explaining why a tutorial doesn't work for you doesn't help us at all in helping you if you don't refer the tutorial. So, I'm just going to pass to even guess a suggestion on that. XD
Yeah the attacking thing is weird I really don't understand why a guide even offered this certain way of attacking so odds are I am just going to take it out.
All I want is to move my character with WASD and not right-clicking.
Wow the part on having my character selected at the start is really easy..no idea why I kept missing the trigger for that even though I looked in the same area for ever.
All it took was event > unitselection > and make my character. For some reason I think it might have to do with me just learning on how to turn on all dependencies...or maybe I just missed it tons of times.
I have my character able to move with wasd and I want him to only move this way but right-clicking also moves him and I have yet to find a way to just disable the movement part of rightclicking. I have tried taking off the smartmove or smartscan (whatever it is called) but when I did that I could not pick items up. If someone knows a command I can do to pick items up with space while I am on the item then that would work too.
I also now have the problem where I made my unit unselectable but the map starts when he is selected and this makes a problem when a player pushes F2 to target hero (or clicks on the hero icon) because then it deselects the unit. If there is a way to hide the hero button and disable f2 then that would be great.
To clairify I need a way to disable right-click movement or a way to pick items up with spacebar and a way hide the hero button.
I tried to disable rightclick movement by triggers and I feel like I am near getting it but then I just get lost. So far I have a ifthenelse trigger but it does not work. I have
IF = comparison((evenmouseclickedbutton()),==,C_mousebuttonright
Then = Unitsetstate(mycharacter), C_unitstatepaused, True
but again it does not work and give me an error in-game saying im missing an action.
Someone helped me make a trigger that stops unit on rightmouse clicks...but found out this stops all movement such as picking up items and attacking. Anyone know a way to just stop movement by rightclick but no alter picking up items, attacking, and wasd movement?
bit late and not the whole trigger but maybe some one still ask for it
Mouse Down Left
Events
UI - Player Any Player clicks Left mouse button Down.
Local Variables
Cam Target = (Current camera target of player (Triggering player)) <Point>
Mouse Clicked = (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world))) <Point>
Conditions
Player Spell Info 2[(Triggering player)].Right Pressed == False
Actions
Variable - Set Player Move and Attack Info 2[(Triggering player)].Left Pressed = True
Variable - Set Player Move and Attack Info 2[(Triggering player)].Move Direction = (Angle from Cam Target to Mouse Clicked)
Unit - Turn Heroes 2[(Triggering player)] Selectable state Off
Unit Selection - Deselect Heroes 2[(Triggering player)] for player (Triggering player)
Unit - Turn Heroes 2[(Triggering player)] Movable state On
Mouse Up Left
Events
UI - Player Any Player clicks Left mouse button Up.
Local Variables
Conditions
Actions
Variable - Set Player Move and Attack Info 2[(Triggering player)].Left Pressed = False
Variable - Set Player Move and Attack Info 2[(Triggering player)].Unit Clicked = False
Unit - Order Heroes 2[(Triggering player)] to ( Stop) (Replace Existing Orders)
Unit - Turn Heroes 2[(Triggering player)] Selectable state On
Unit Selection - Select Heroes 2[(Triggering player)] for player (Triggering player)
Unit - Turn Heroes 2[(Triggering player)] Movable state Off
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have two major problems holding my map back at this time. One is I want to have my hero un-selectable but to pick items up you must have the hero selected...is there any way to have my unit always selected but can not be moved by a right-click?
The next problem has to do with my character attack. I have it as a system I found in a guide but it does not seem to be the best system. What it does is have a region that appears where I rightclick but it does not seem to move as I click so my character moves but the point does not and the attack on it is random so even if I click on a enemy within the region that moved it may not attack the one I wanted. But I am fairly positive if there is a fix to my character select issue I can just make my character attack like normal but he cant move that way.
Main thing I really need at this time is just a way to turn off movement with right-clicking. I am fairly sure the whole turn off smartmove thing works but that also made it where I can't pick items up and I don't want that.
Shameless bump as this is the only problem I really have with my map at the moment...unless it does not fix the attack problem then well one out of two problems.
@ace1177: Go
You could just create a trigger that periodically (like every 0.1 second) selects your hero, I guess.
that would work just seems like there would be a way to just do it but I can live without it I guess. Still really want the no movement on right-click though :D
You're doing something weird and your inquiry is too vague to really understand what you're trying to do.
For not moving hero with right click: Disable your hero's ability to move at all, that is set the unit's Movement - fields inside the Unit Tab on the Data Editor to 0's, and also remove the Move ability. Then right clicking won't do anything regardless of selection. If you need a temporary lack of movement, create a hidden behavior (type: buff) with the Modification -> Modify Flags -> Suppress Movement option checked. Then remove/add this behavior as movement is needed. (Alternatively, Pause the unit via triggers).
As far as picking up items, I would suggest rewriting the item pick up system to be driven without the hero's interaction, or perhaps do a form of trigger pick up (manual), this isn't easy to explain though.
At the attacking part, that made absolutely no sense, explaining why a tutorial doesn't work for you doesn't help us at all in helping you if you don't refer the tutorial. So, I'm just going to pass to even guess a suggestion on that. XD
Yeah the attacking thing is weird I really don't understand why a guide even offered this certain way of attacking so odds are I am just going to take it out.
All I want is to move my character with WASD and not right-clicking. Wow the part on having my character selected at the start is really easy..no idea why I kept missing the trigger for that even though I looked in the same area for ever.
All it took was event > unitselection > and make my character. For some reason I think it might have to do with me just learning on how to turn on all dependencies...or maybe I just missed it tons of times.
Last bump before I get off.
I have my character able to move with wasd and I want him to only move this way but right-clicking also moves him and I have yet to find a way to just disable the movement part of rightclicking. I have tried taking off the smartmove or smartscan (whatever it is called) but when I did that I could not pick items up. If someone knows a command I can do to pick items up with space while I am on the item then that would work too.
I also now have the problem where I made my unit unselectable but the map starts when he is selected and this makes a problem when a player pushes F2 to target hero (or clicks on the hero icon) because then it deselects the unit. If there is a way to hide the hero button and disable f2 then that would be great.
To clairify I need a way to disable right-click movement or a way to pick items up with spacebar and a way hide the hero button.
bump because I really need help on the issue.
Edit: Action > UI > UIsetframevisible > c_syncframetypeheropanel, false
I tried to disable rightclick movement by triggers and I feel like I am near getting it but then I just get lost. So far I have a ifthenelse trigger but it does not work. I have
IF = comparison((evenmouseclickedbutton()),==,C_mousebuttonright Then = Unitsetstate(mycharacter), C_unitstatepaused, True
but again it does not work and give me an error in-game saying im missing an action.
Someone helped me make a trigger that stops unit on rightmouse clicks...but found out this stops all movement such as picking up items and attacking. Anyone know a way to just stop movement by rightclick but no alter picking up items, attacking, and wasd movement?
bit late and not the whole trigger but maybe some one still ask for it
Mouse Down Left
Events
UI - Player Any Player clicks Left mouse button Down.
Local Variables
Cam Target = (Current camera target of player (Triggering player)) <Point>
Mouse Clicked = (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world))) <Point>
Conditions
Player Spell Info 2[(Triggering player)].Right Pressed == False
Actions
Variable - Set Player Move and Attack Info 2[(Triggering player)].Left Pressed = True
Variable - Set Player Move and Attack Info 2[(Triggering player)].Move Direction = (Angle from Cam Target to Mouse Clicked)
Unit - Turn Heroes 2[(Triggering player)] Selectable state Off
Unit Selection - Deselect Heroes 2[(Triggering player)] for player (Triggering player)
Unit - Turn Heroes 2[(Triggering player)] Movable state On
Mouse Up Left
Events
UI - Player Any Player clicks Left mouse button Up.
Local Variables
Conditions
Actions
Variable - Set Player Move and Attack Info 2[(Triggering player)].Left Pressed = False
Variable - Set Player Move and Attack Info 2[(Triggering player)].Unit Clicked = False
Unit - Order Heroes 2[(Triggering player)] to ( Stop) (Replace Existing Orders)
Unit - Turn Heroes 2[(Triggering player)] Selectable state On
Unit Selection - Select Heroes 2[(Triggering player)] for player (Triggering player)
Unit - Turn Heroes 2[(Triggering player)] Movable state Off