Hello! I was wondering if anybody can help me figure out why my code wont delete an object. This is my first time using del so I'm sorry if it is really obvious.
trigger:
function update_slash_p1()
for s in all(slash_p1) do
s.dx+=1
if s.dx>8
then
kill_slash_p1()
end
end
code:
function kill_slash_p1()
del(slash_p1,
dx,
frame,
flip,
damage
)
end
I also tried:
del(slash_p1,{
dx,
frame,
flip,
damage
})
end
Thank you!
P#130069 2023-05-23 17:18 ( Edited 2023-05-23 17:54)
function _init()
f={}
end
function _update()
add(f,{y=1})
end
function _draw()
cls()
map()
print(f.y,58,58,8)
end
The print displays that that f.y is nil, could somebody please help?
P#108111 2022-03-06 01:52
Is there a way to detect when time() changes? I’m trying to make a movement system where when a button is pressed a sprite moves for a certain amount of time.
P#103915 2021-12-31 16:03