magggas said:
Can you maybe tell me what script is this and where to put?
Anywhere before select screen.
You can put in endlevelscript,animationscript and etc...
Edit: By the way,i´m planing to have an branch level in the normal mode.
Is possible with this script to unlock a char only if you will play this branch level?
That's for sure.
This is my script from RocketViper2
void setSelectable()
{
void st=openborvariant("current_stage");//Get current stage.
setValid("Sarah",st>2);//To make sarah selectable only after stage 2.
setValid("Ingrid",getglobalvar("clearCount")>0);//To make Ingrid selectable after you finish the game once.
}
Edit:
I suggest you put the following script in update.c
#define MODEL_NAME 2
#define SELECTABLE 4
#define MAXENTCOUNT openborvariant("models_cached")
#define obv openborvariant
void setValid(void name,void isselectable)
{
int i;
for(i=0;i<MAXENTCOUNT;i++)
{
if(getmodelproperty(i,MODEL_NAME)==name)
{
changemodelproperty(i,SELECTABLE,isselectable);
return;
}
}
}
void main()
{
void branchname;
if(obv("in_selectscreen"))
{
branchname=obv("branchname");
//Set your own settings here***
setValid("Fumma",branchname=="Branch1")//Set Fumma is selectable only in branch <Branch1>
//*****************************
}
}