• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Solved 2nd select screen animations

Question that is answered or resolved.

AlexDC22

Well-known member
so i adapted the script below from LDD by Mr.Q ( great game BTW )
and it works fine in the player select screen, the first of two...and hence the issue am having...how do i use the same scrip for the second select screen which is half way through the game.
i have them both set almost identical but still no dice...i know is me not the script lol... i know it has to do with this bit of code "in_selectscreen"
as it is both animations show in the 1st select screen...nothing on the second one...thanks
this bit is how its called in the animation text file....
thats for the first one...second one is the same but in a different folder obviously lol

Code:
anim    idle
    loop    1
    offset    1 1
    delay    6
    @cmd    changeentityproperty getlocalvar("self") "direction" 1
    frame    data/chars/misc/pnameanim/pn1.gif
    @cmd    changeentityproperty getlocalvar("self") "setlayer" -2000
    frame    data/chars/misc/empty.gif

second select screen i have it like this in the levels text file and it shows up and works as intended...

Code:
select      data/bgs/select2.txt
 

Attachments

Last edited:
I'm not sure what kind of effect you are talking about here. AFAIK any select screen animation will be played in all select screens: default and custom ones.
 
I'm not sure what kind of effect you are talking about here. AFAIK any select screen animation will be played in all select screens: default and custom ones.
well the way it is both show up in the first select screen at the start of the game, but nothing shows up at the second select screen at the start of level 5...they are also 2 different select screens and hence the two different animations...
again i know is me as i suck at scripting... i do ok adapting by trial and error to no end like i did here...but creating from nothing? lol never lol
thanks again
 
anyone? xD
some links got fixed for scripts and i see that this was discussed here [DEMO] Animated Title and Base mod problem no discusions of a second select screen animations...and i also tried some of the ones there using both update.c and updated.c but not luck to get those to even work.... i know l know i just more of an clear example type of learner lol
some of this stuff is not to clear for me...again is a me problem i get it....anyways hope someone can shed some light and or help achieve this.
thx again folks.
 
I've just tested this myself and have experienced the issue myself.
I have good guess of the cause of the problem but I need to do some trial n errors to get the solution 🙂 .
 
I've just tested this myself and have experienced the issue myself.
I have good guess of the cause of the problem but I need to do some trial n errors to get the solution 🙂 .
thank you at least now i know is not all me yay... lol thanks brother
 
Alright, I've done couple trial n errors and could make a solution.
I have to say could cause I'm testing this on my version of LDD not your mod. IOW I don't know if it's going to work there or not unless you try it yourself.

The solution are these 2 files in attached rar. Unrar this and put them in data/scripts folder. Yes, overwrite the ones you have with these.
Try these and tell me the results :)
 

Attachments

I made that script back in the day, with help of White Dragon. You will need to use different varaibles names to achieve what you want.
For example, you will need a variable to know when you are calling the first selecrt screen, and when you are callin the other one.,
 
Alright, I've done couple trial n errors and could make a solution.
I have to say could cause I'm testing this on my version of LDD not your mod. IOW I don't know if it's going to work there or not unless you try it yourself.

The solution are these 2 files in attached rar. Unrar this and put them in data/scripts folder. Yes, overwrite the ones you have with these.
Try these and tell me the results :)
sadly while it shows up on both select screens now yay.....both animations show at the same time still lol...so its progress hehe...i played around but nothing changes.
thanks

@O Ilusionista
I made that script back in the day, with help of White Dragon. You will need to use different varaibles names to achieve what you want.
For example, you will need a variable to know when you are calling the first selecrt screen, and when you are callin the other one.,
theyre both named differently... pnameanim and pnameanim2... sorry not sure if thats what you meant :/
also they are counter and counter2 respectively.
thanks
 
Last edited:
if you don't use an extra variable to track in which select screen you are, the engine won't know it.
thanks but i cant script to save my life lol...i can adapt them most time from elsewhere tho :/
this is how it looks...you can see the select 2 screen names pop up as well as the first one lol
 
Wait a second, I lost track here. Do you actually want one animation to play on first select screen and the other on second select screen? or something else? 🤔
lol yes ...that is correct sir :)
2 different animations....1 for the 1st select and the other one for the 2nd one where the 3 characters will be added.
thanks
 
if you don't use an extra variable to track in which select screen you are, the engine won't know it.
just out of curiosity ... is this what you mean?
Code:
  if(openborvariant("in_selectscreen"))
i know of options and title screen...but a second select screen? lol way above my paygrade lol
thanks again
 
This make curious so I've done some tries to get it right and I got it :cool:

For AlexDC's game, just as before I don't have the game so I can't test these scripts. The only thing I could do is attach the updated files here.
Try these and tell me the results :)
 

Attachments

This make curious so I've done some tries to get it right and I got it :cool:

For AlexDC's game, just as before I don't have the game so I can't test these scripts. The only thing I could do is attach the updated files here.
Try these and tell me the results :)
its like youre made out of magic sir xD
like FREAKING AWESOME HAHA!!!! it works woohoo...and looking at what you did i would have never thought of that, for real thanks so much.... :')
 
sorry to bug you folks about this old one but back in 2022 before i lost the game this was working as it should...and now i just noticed that its just playing the the select screen 1 on both select screens, nothing is changed from when bloodbane fixed it for me and sadly i cant figured this mostlikely simple issue myself...smfh.. if you can and are willing to assist id be very grateful..thanks.

updated.c
C:
void main(){
//MAIN START
  void SelAnim = getglobalvar("selanim"); // Read select screen animated state to check

  if(openborvariant("in_menuscreen")){ // Check if the game is in menu screen
    setglobalvar("counter", NULL());
    setglobalvar("selanim", NULL());
  }

  if(openborvariant("in_selectscreen") && SelAnim!=1){ // Check to avoid double spawn
    void counter = getglobalvar("counter"); // Read variable 1 to check

    if(counter!=1 && counter!=2){ // first select screen
      void subent;

      loadmodel("pnameanim"); // load the entity to be loaded
      clearspawnentry(); // clean the spawn entry
      setspawnentry("name", "pnameanim"); // define the entity to be spawn
      setspawnentry("coords", 1,0,-1); // set the position of the entity

      subent=spawn();  //  spawn the entity
      changeentityproperty(subent, "position", 1,0,-1); //for safe, set again the position
      setglobalvar("counter",1); // counting select screen order
      setglobalvar("selanim",1); // set the variable to 1, blocking a new spawn to be made
    } else if(counter==1){ // second select screen
      void subent;

      loadmodel("pnameanim2"); // load the entity to be loaded
      clearspawnentry(); // clean the spawn entry
      setspawnentry("name", "pnameanim2"); // define the entity to be spawn
      setspawnentry("coords", 1,0,-1); // set the position of the entity

      subent=spawn();  //  spawn the entity
      changeentityproperty(subent, "position", 1,0,-1); //for safe, set again the position
      setglobalvar("counter",2); // counting select screen order
      setglobalvar("selanim",1); // set the variable to 1, blocking a new spawn to be made
    }
  }
} // MAIN END

level.c
C:
void main()
{
  setglobalvar("zoomentity", NULL());

  setglobalvar("selanim", NULL());
}

animations for screen 1 and then 2, frames where left out to shorten the lenght of the post.
Code:
name    pnameanim
type    none
setlayer -2000
facing 1
alpha  1


anim    idle
    loop    1
    offset    1 1
    delay    6
    @cmd    changeentityproperty getlocalvar("self") "direction" 1
    frame    data/chars/misc/pnameanim/pn1.gif
    @cmd    changeentityproperty getlocalvar("self") "setlayer" -2000
    frame    data/chars/misc/empty.gif
    delay    6
    frame    data/chars/misc/pnameanim/pn2.gif
    delay    100
    frame    data/chars/misc/empty.gif
    delay    6
    frame    data/chars/misc/pnameanim/pn3.gif
    delay    90
    frame    data/chars/misc/empty.gif
    delay    6
    frame    data/chars/misc/pnameanim/pn4.gif
    delay    110
    frame    data/chars/misc/empty.gif
    delay    22
    frame    data/chars/misc/pnameanim/pn5.gif
    delay    70
    frame    data/chars/misc/empty.gif

Code:
name    pnameanim2
type    none
setlayer -2200
facing 1
alpha  1


anim    idle
    loop    1
    offset    1 1
    delay    6
    @cmd    changeentityproperty getlocalvar("pnameanim2") "direction" 1
    frame    data/chars/misc/pnameanim2/pn01.gif
    @cmd    changeentityproperty getlocalvar("pnameanim2") "setlayer" -2200
    frame    data/chars/misc/empty.gif
    delay    6
    frame    data/chars/misc/pnameanim2/pn02.gif
    delay    100
    frame    data/chars/misc/empty.gif
    delay    22
    frame    data/chars/misc/pnameanim2/pn03.gif
    delay    90
    frame    data/chars/misc/empty.gif
    delay    6
    frame    data/chars/misc/pnameanim2/pn04.gif
    delay    110
    frame    data/chars/misc/empty.gif
    delay    6
    frame    data/chars/misc/pnameanim2/pn05.gif

ideally would like to keep them separated that way if i want to add a 3rd select screen it be easier.
thanks again... just not sure if the 2 year span changed anything to cause this as it was working back then and sadly am on openbor v4
 
Hmmm... have you declared scripts to tell OpenBoR to use select screen animation 1 or 2?
what i have here is what i had then...nothing has changed on my part... am afraid am still kinda green with the scripts... what do you mean declare? like in the select1 and select2 text files? apologies i didnt think id had to deal with this one again lol
in levels text i mean
Code:
maxplayers  3

skipselect
scene      data/scenes/title.txt
select     data/bgs/select1.txt
 
Back
Top Bottom