Page 1 of 1

Rolling and Scaling a FLATSPRITE

PostPosted: Tue Nov 21, 2017 9:19 pm
by SPZ1
This code below is how I first figured that it would be done. Unfortunately, it didn't work and a bunch of variations didn't work either. Is there any way to do this?
Note: The 'DONE' state is being switched to with an ACS script so it is not the problem..

Code: Select allExpand view
ACTOR Septagram_Floor 19201 {
   Height 512
   Radius 256
   Scale 0.5   //128x128
   +FLATSPRITE
   //+ROLLSPRITE
   +ROLLCENTER
   States {
      Spawn:
         SEPT G 1 BRIGHT {
            roll += 3;   
         }

         Loop
      Done:
         SEPT G 1 BRIGHT {
            roll += 3;
            scaleX -= 0.05;
            scaleY -= 0.05;

            //A_SetScale(scaleX, scaleX);
         
            if (scaleX <= 0.0){
               return state("Null");
            }else{
               return state("Done");
            }
         
      
         }

         Loop
   }
}

Re: Rolling and Scaling a FLATSPRITE

PostPosted: Wed Nov 22, 2017 12:01 am
by Jaxxoon R
Considering it looks like you want this to be some kind of floor decoration, I'd suggest adjusting the angle instead of the actor's roll. You've also got the rollsprite flag commented out, so even if you were to adjust the roll there'd be no visual effect.

Re: Rolling and Scaling a FLATSPRITE

PostPosted: Wed Nov 22, 2017 1:26 am
by Graf Zahl
The main problem with FLATSPRITEs is that they were basically thrown into the engine due to public pressure without ever thinking through the implementation. Don't try to do any more involved stuff with them as it's really not properly defined. As long as you don't try to tilt or roll them they should be ok, but no guarantees beyond that.

Re: Rolling and Scaling a FLATSPRITE

PostPosted: Wed Nov 22, 2017 7:09 am
by SPZ1
They seem to be able to roll infinitely without a problem... It is the scaling that gets messy :(

Re: Rolling and Scaling a FLATSPRITE

PostPosted: Wed Nov 22, 2017 6:20 pm
by Major Cooke
Use angle instead because flat sprites are horizontal without pitch.

Think of roll as doing a barrel roll. Or just like a dog rolling over and playing dead.