Bloodbane
Well-known member
Hmm... this one:
With these lines, if one player falls to hole, all players will lose one life instead of just the falling player. Is that what you want?
Also you're missing jumptobranch() function which works as the restarting script
About endlevel.c, it should be like this:
#1 and #2 are okay.
As for #3, you're right about using ondeatchscript to spawn the dialogue but that also means jumptobranch function should be moved to the dialogue entity to ensure dialogue is played fully before restarting
Code:
...
if(getentityproperty(p1, "exists"))
{
changeplayerproperty(0, "lives", p1lives -1);
}
if(getentityproperty(p2, "exists"))
{
changeplayerproperty(1, "lives", p2lives -1);
}
if(getentityproperty(p3, "exists"))
{
changeplayerproperty(2, "lives", p3lives -1);
}
...
With these lines, if one player falls to hole, all players will lose one life instead of just the falling player. Is that what you want?
Also you're missing jumptobranch() function which works as the restarting script
About endlevel.c, it should be like this:
Code:
#include "data/scripts/story/story_clear.c"
void main()
{
clearStory();
setdrawmethod(NULL(),0,256,256,0,0,0,0,0,0,0,0,0,NULL());
setindexedvar(1, NULL());
}
1) First set the ondeathscipt in all players.
2) Set this in the levels with the restart holes.
#1 and #2 are okay.
As for #3, you're right about using ondeatchscript to spawn the dialogue but that also means jumptobranch function should be moved to the dialogue entity to ensure dialogue is played fully before restarting