I'm new to pulp script and novice overall in programming language and game design.
What I'm trying to do is to add sprites to the room layer that all have different effects. I have moving crates, animated death shuriken and a TnT barrel that one day may actually roll like in Donkey Kong Country and upon touching something, go BOOM!
I'm having trouble with how I would script the barrel to move in a line to a destination. I have accomplished the "moving" by modifying the script I used for the crate:
on interact do // Determine destination coordinated of crate DesX = event.x DesY = event.y if event.dy==1 then // if players recent up movment DesY+=5 // then change var y is incremented by 1 elseif event.dy==-1 then // if player recent down movment DesY-=5 // decrement 1 elseif event.dx==1 then DesX+=5 elseif event.dx==-1 then DesX-=5 end // parts of interact event are limited to the direction "pushed"
As you can imagine, currently the barrel "jumps" 5 increments. I just can't figure out how to swap white tiles in the intermittent spaces to give the appearance of the barrel "moving" or "sliding". The remaining script for the crate is simply insufficient for this.
I'm pouring over other example pulp script looking for examples that I can learn from, and I just haven't found the right ones or maybe I've been looking in the wrong places?
If y'all have seen this someplace else, I would appreciate a friendly point in the right direction! Any help would be greatly appreciated