I was seeking some way to do this recently and just find out:
1st apply the CSTAT_SPRITE_SLOPE to your actor:
define CSTAT_SPRITE_SLOPE 48
// inside actor code or EVENT_GAME
geta[THISACTOR].cstat my_cstat
or my_cstat CSTAT_SPRITE_SLOPE
seta[THISACTOR].cstat my_cstat
Then, you'll have obtain the current sector's floorslope property and convert it to xoff/yoffset:
var my_xoffset 0 2
var my_yoffset 0 2
var my_angle 0 2
var my_wall_id 0 2
var my_wall_x1 0 2
var my_wall_x2 0 2
var my_wall_y1 0 2
var my_wall_y1 0 2
var my_floorslope 0 2
var my_point2 0 2
defstate set_sprite_floor_slope
// get sector data
geta[THISACTOR].sectnum my_sectnum
gets[my_sectnum].floorslope my_floorslope
ife my_floorslope 0
break
gets[my_sectnum].wallptr my_wall_id
// setup xoff/yoff with floorslope value
set my_xoffset my_floorslope
and my_xoffset 255
set my_yoffset my_floorslope
shiftr my_yoffset 8
and my_yoffset 255
// get wall data
getw[my_wall_id].x my_wall_x1
getw[my_wall_id].y my_wall_y1
getw[my_wall_id].point2 my_point2
getw[my_point2].x my_wall_x2
getw[my_point2].y my_wall_y2
sub my_wall_x1 my_wall_x2
sub my_wall_y1 my_wall_y2
// retrieve the desired angle
getangle my_angle my_wall_x1 my_wall_y1
add my_angle 512 // Don't ask me why I'm doin' this
// apply values
seta[THISACTOR].xoffset my_xoffset
seta[THISACTOR].yoffset my_yoffset
seta[THISACTOR].angle my_angle
ends
After that, setup your sprite
onevent EVENT_GAME {
ifactor xpto {
state set_sprite_floor_slope
}
} endevent
The bad thing is that your actor will always be facing the first wall (as mentioned before).
I don't know if this is the best way to do this but it's working fine for me.
BTW I guess that you'll also need to calculate the correct z (getflorzofslope), as a decal not fall, so you'll need to set the ground position for it.