VirtusVerbis
Member
Hi All,
Objective:
I want to create a Player model specific cutscene (ie: create a custom cutscene when player 1 is using "KULA").
Does anyone know of a MOD that makes use of character specific in-game cutscenes, so that I can reference how it is done?
I know how to create an Entity with Type = Text, which I plan to use as in-game narrative cutscenes:
I assume that the <my_level>.txt scripting would work similar to entity level scripting for animations ? ( I can't seem to find any documentation that says it does or doesn't).
Where I am stuck at is how to script in the logic in the <my_level.txt> (ie: like example1.txt level).
If I put in script like this, I get no errors and the log output is not produced in the OpenBOR log.txt :
I then also tried scripting something to spawn (just to see if animation script I know works, will work with my example1.txt level). I get no errors in OpenBOR.txt but also nothing appears on screen either.
This is how I imagine my script would work (if it did):
Thank you.
Objective:
I want to create a Player model specific cutscene (ie: create a custom cutscene when player 1 is using "KULA").
Does anyone know of a MOD that makes use of character specific in-game cutscenes, so that I can reference how it is done?
I know how to create an Entity with Type = Text, which I plan to use as in-game narrative cutscenes:
Basic Stats
type {type}
- {type}:
- text: The entity is a message object. When spawned, it will freeze all objects in play and show it’s *IDLE* animation, then dissapear. It can be sped up by pressing attack or jump. Can be used for level intros, mid-level cutscenes, etc.
I assume that the <my_level>.txt scripting would work similar to entity level scripting for animations ? ( I can't seem to find any documentation that says it does or doesn't).
Where I am stuck at is how to script in the logic in the <my_level.txt> (ie: like example1.txt level).
If I put in script like this, I get no errors and the log output is not produced in the OpenBOR log.txt :
C:
#--group1-----
spawn 1up
coords 300 180
at 0
@script
void main()
{
char p1name = getplayerproperty(0, "name");
log(" \n Player 1 name :" + p1name);
}
@end_script
spawn Drum
coords 150 170
at 0
I then also tried scripting something to spawn (just to see if animation script I know works, will work with my example1.txt level). I get no errors in OpenBOR.txt but also nothing appears on screen either.
C:
#--group1-----
spawn 1up
coords 300 180
at 0
@script
void main()
{
void self = getlocalvar("self"); //Get calling entity.
void vSpawn; //Spawn object.
int iDirection = getentityproperty(self, "direction");
int fX = 0;
int fY = 0;
int fZ = 0;
clearspawnentry(); //Clear current spawn entry.
setspawnentry("name", "Apple"); //Acquire spawn entity by name.
vSpawn = spawn(); //Spawn in entity.
changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
}
@end_script
spawn Drum
coords 150 170
at 0
This is how I imagine my script would work (if it did):
C:
#--group1-----
spawn 1up
coords 300 180
at 0
@script
void main()
{
char p1name = getplayerproperty(0, "name");
if (p1name == "Kula") //show cutscene if matching
{
void self = getlocalvar("self"); //Get calling entity.
void vSpawn; //Spawn object.
int iDirection = getentityproperty(self, "direction");
int fX = 0;
int fY = 0;
int fZ = 0;
clearspawnentry(); //Clear current spawn entry.
setspawnentry("name", "Apple"); //Acquire spawn entity by name.
//I'm using apple because I didn't create the 'text' cutscene yet
vSpawn = spawn(); //Spawn in entity.
changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
}
@end_script
spawn Drum
coords 150 170
at 0
Thank you.
Last edited: