Autoscrolling effect

Yeah that's what Id been doing until now.  I'm still going to use that trick for some things.  Wolf3d always shows the 'end level' switch scene.  Some parts of doom I added first person scenes of doors being opened etc.  Wold3d is fine, but some of the old doom gif's need redoing.

My other method I'm still using for some doors is just fading to black when you enter.  but part of the door and the player remain visible (with setlayer) , then it loads the gif scene on the next branch for transition.  This is what I had at first for the scrolling ones, thou it looks smoother when I used the script. 

I've had a lot of these things for years, but I thought trying to script some of it instead would mean a lot less branches, gifs etc. in the long run.

 
Why dont you combine autoscroll and wind effect entity (the one that pushes entities away) to drag the players or enemies when being on the edge of the screen? Could work as a complete solution.
--
OK i did it an combined them, now this autoscroll will take care of moving player entity when hes touching border, but you ahve to adjust for your own resolution, my mod is 1280x720 and you count distance 600 pixels from middle of the screen when its over that then it starts to move player.
Code:
spawn  ascroll
flip  1
coords 640 400
at 0
name  ascroll
speed  0
type  none
shadow 0
offscreenkill 999999
subject_to_hole 0
subject_to_gravity 0
nomove 1 1

anim spawn
@script
    if(frame==1){
      changelevelproperty("scrollspeed", 0);
    }
@end_script
  delay  5
  offset  1 1
  frame  NONE
  frame  NONE

anim idle
@script
    void self = getlocalvar("self");
    int Dir = getentityproperty(self, "direction");
    int XPos = openborvariant("xpos");
    int Width = openborvariant("levelwidth");
    int Screen = openborvariant("hResolution");
    void vEntity;                                    //Target entity placeholder.
    int iEntity;                                    //Entity enumeration holder.
    int iType;                                      //Entity type.
    int iMax      = openborvariant("ent_max");      //Entity count.
    int x = getentityproperty(self, "x");
    int Ex;
    int  pos  = openborvariant("xpos");
      if( Dir==1){
        changeentityproperty(self, "position",  getentityproperty(self, "x")+10);
      }
        if( Dir==0){
        changeentityproperty(self, "position",  getentityproperty(self, "x")-10);
      }
    //Enumerate and loop through entity collection.
    for(iEntity=0; iEntity<iMax; iEntity++){
      vEntity = getentity(iEntity);                //Get target entity from current loop.
      iType  = getentityproperty(vEntity, "type"); //Get target type.
    Ex = getentityproperty(vEntity, "x");
        if(iType == openborconstant("TYPE_PLAYER") && Dir==1 && Ex < pos + 40 ){
          changeentityproperty(vEntity, "position", Ex+10);
}
        if(iType == openborconstant("TYPE_PLAYER") && Dir==0 && Ex > pos + Screen - 40 ){
          changeentityproperty(vEntity, "position", Ex-10);
}
      }
    if(Dir==1){
      if(XPos < Width-Screen && Dir==1){
        changeopenborvariant("xpos", XPos+10);
      } else {
        changelevelproperty("scrollspeed", 10);
        killentity(self);
      }
    } else if(Dir==0){
      if(XPos > 0){
        changeopenborvariant("xpos", XPos-10);
      } else {
      changelevelproperty("scrollspeed", 10);
        killentity(self);
      }
    }
@end_script
  loop  1
  delay  2
  offset  1 1
  frame  NONE
  frame  NONE[/code]
 
Back
Top Bottom