A little help here ....

I have LMB as the shoot button
also LMB is used to move some objects

I have five bullets so when i shoot global var. ammo goes to 4 and then after 1 second >> i add +1 global var. ammo to go back to 5 again and so on .

alright my problem here is … i only want to shoot when i’m not dragging an object or not on a draggable object .

Btw i don’t use draggable behavior but i use physics .

So the question will be … How to shoot only when not on any of the draggable objects “They all have physics behavior” ?

I tried :-
conditions : LMB is down
Cursor is “not” on “draggable object name”
Trigger once
Actions : Do -1 to global var.ammo

Sadly didn’t work …

Hope anyone can help me with this little problem …
Thanks as always …

If you have it set up as Lizard13 suggested in another thread, then you can check the value of dragged =0 in the condition and then do your firing action.

Yeah i have it just as Lizard-13 suggested … yeah i did that but also didn’t work .

If the drag variable is an object variable (because you have multiple draggable objects), you should count if the number of objects with variable drag = 1 is 0:

Conditions: No conditions Actions: Do = 0 to variable "drag_count" // Sub-event Conditions: Variable "drag" of DraggableObject is = 1 Actions: Do = Count(DraggableObject) to variable "drag_count"

Now you can use the “drag_count” variable anywhere to check if the number of objects being drag is = 0.

Lizard-13 Like this you mean ?
It Didn’t work … the player still shoot even if i’m dragging the object .
Sorry but I don’t understand what you mean by Count ?
Take a look at the events . hope you find something .