I have a selection and move script below everything works but when I want to make the deselect with alt + left click It does not work >.<. it does if I just use alt but with he left click it doesnt.
LEFT CLICK IS CALLED select
I also would like to see if there is a better way to go about making the destionation so that the person goes to that spot and can still move others at same time since i use one destination marker model i can only move one at a time cause it just moves it when i right click. a script example would be appreciatiated.
oh and with multiple selected units how do I get it so that they move to same spot and stop and not run into eachother getting to that exact center ?
SCRIPT ------------------------------------------------------------
cont = GameLogic.getCurrentController()
own = cont.owner
#Defining -------------------------------------------------------
mouseOver = cont.sensors[“MouseOver”]
select = cont.sensors[‘Select’]
rightclick = cont.sensors[‘RightClick’]
reached = cont.sensors[‘Reached’]
targetpos = cont.actuators[‘TargetPos’]
motion = cont.actuators[‘Motion’]
alt = cont.sensors[‘Alt’]
#Script ---------------------------------------------------------
if select.positive and not alt.positive and mouseOver.hitObject == own:
own[‘selected’] = 1
if rightclick.positive and not mouseOver.hitObject.has_key(“enemy”) and own[‘selected’] == 1:
cont.activate(motion)
cont.activate(targetpos)
if reached.positive:
cont.deactivate(targetpos)
cont.deactivate(motion)
if select.positive and mouseOver.hitObject.has_key(“deselect”) and not mouseOver.hitObject == own:
own[‘selected’] = 0
cont.deactivate(targetpos)
cont.deactivate(motion)
if select.positive and alt.positive and mouseOver.hitObject == own:
own[‘selected’] = 0
cont.deactivate(targetpos)
cont.deactivate(motion)