Hello everyone! I'm currently facing an issue how do I detect if i click on an image ??? if that's not possible, how about a body ??
CONCLUSION: how do i detect if i clicked on a pic or body? like what code ?? please show me the code that can for example if I click on a square that square disappears or if I click on a image that image disappears. thank you in !
Detecting Clicks?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Detecting Clicks?
Always something like:-Bangester- wrote: ↑Wed Jul 05, 2023 8:59 pm Hello everyone! I'm currently facing an issue how do I detect if i click on an image ??? if that's not possible, how about a body ??
CONCLUSION: how do i detect if i clicked on a pic or body? like what code ?? please show me the code that can for example if I click on a square that square disappears or if I click on a image that image disappears. thank you in !
Code: Select all
for iObj, obj in ipairs (Objects) do
if mustBeDeleted (obj) then
obj.valid = false -- just ignore it or remove it later
end
end
Code: Select all
for iObj = #Objects, 1, -1 do -- backwards
local obj = Objects[iObj]
if mustBeDeleted (obj) then
table.remove (Objects, iObj)
end
end
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 9 guests