Post new topic    
Slime
Send private message
how to change the hero sprite frame in plotscript? 
 PostWed Dec 04, 2019 12:55 pm
Send private message Reply with quote
let's say i load a hero sprite from a slice collection, how would i go about changing its animation frame with plotscript commands?
Shall we gather for whiskey and cigars tonight?
Slime Knight
Send private message
 
 PostWed Dec 04, 2019 2:15 pm
Send private message Reply with quote
Is it "set sprite frame"? I've used it like that once on a walkabout sprite:
Code:
global variable (1,g)
plotscript,examplename,begin
g := load walkabout sprite (313,100) # Load Walkabout nr. 313 with palette nr. 100
put slice (g,240,110) # Put the sprite on position x=240 and y=110
set sprite frame (g,1) # Change the graphics
end
Metal King Slime
Send private message
 
 PostWed Dec 04, 2019 2:25 pm
Send private message Reply with quote
Yes. The frame number would be 0 to 7.

Just an aside: this is in contrast to the "set hero frame" or "set npc frame" commands, which take a frame number of 0 to 1, and you have to set the NPC/hero direction to get all 8 frames. (And you can't use "set sprite frame" on NPC or hero sprite slices because builtin hero/NPC animation will override your changes. Only works on sprite slices you create yourself.)
Display posts from previous: