Here's my main questions:
1) How can I make my mouse cursor be replace with the current slice I have selected? (I want to know which slice I'm placing before I place it on screen, I've gotten close but most of my attempts result in the slice image being placed over and over again in a trail as I move the mouse across the screen.)
2) And out of curiosity, how can I make the mouse cursor appear above the Slice images placed on the screen?
Here's my current code so you can get a better idea of where I'm at:
Code:
global variable (0, a)
plotscript, display mouse, begin
a := 0
init mouse
while (true) do(
variable(sl)
put npc (0, mouse pixel x + camera pixel x, mouse pixel y + camera pixel y)
while (mouse click (left button) == true) do(
sl := load large enemy sprite(a)
set slice x(sl, mouse pixel x + camera pixel x)
set slice y(sl, mouse pixel y + camera pixel y)
wait
)
wait
)
end
plotscript, On Keypress Handler, begin
if(key is pressed(key:Right Caret)) then(
a := a + 1
)
if(key is pressed(key:Left Caret)) then(
a := a -- 1
)
end
global variable (0, a)
plotscript, display mouse, begin
a := 0
init mouse
while (true) do(
variable(sl)
put npc (0, mouse pixel x + camera pixel x, mouse pixel y + camera pixel y)
while (mouse click (left button) == true) do(
sl := load large enemy sprite(a)
set slice x(sl, mouse pixel x + camera pixel x)
set slice y(sl, mouse pixel y + camera pixel y)
wait
)
wait
)
end
plotscript, On Keypress Handler, begin
if(key is pressed(key:Right Caret)) then(
a := a + 1
)
if(key is pressed(key:Left Caret)) then(
a := a -- 1
)
end
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases



