Allow script to change the side of an entity (for use during optional missions).

This commit is contained in:
Steve 2016-05-15 14:02:35 +01:00
parent 38c0018721
commit 89eb8d4a34
3 changed files with 10 additions and 0 deletions

View File

@ -655,6 +655,10 @@ void killEntity(char *name)
} }
} }
void updateEntitySide(char *side, char *entity)
{
}
void destroyEntities(void) void destroyEntities(void)
{ {
Entity *e; Entity *e;

View File

@ -288,6 +288,11 @@ static void executeNextLine(ScriptRunner *runner)
sscanf(line, "%*s %[^\n]", strParam[0]); sscanf(line, "%*s %[^\n]", strParam[0]);
killEntity(strParam[0]); killEntity(strParam[0]);
} }
else if (strcmp(command, "UPDATE_ENTITY_SIDE") == 0)
{
sscanf(line, "%*s %s %[^\n]", strParam[0], strParam[1]);
updateEntitySide(strParam[0], strParam[1]);
}
else else
{ {
printf("ERROR: Unrecognised script command '%s'\n", command); printf("ERROR: Unrecognised script command '%s'\n", command);

View File

@ -40,6 +40,7 @@ extern void activateSpawner(char *name, int active);
extern void completeAllObjectives(void); extern void completeAllObjectives(void);
extern void createChristabelLocation(void); extern void createChristabelLocation(void);
extern void killEntity(char *name); extern void killEntity(char *name);
extern void updateEntitySide(char *side, char *entity);
extern Battle battle; extern Battle battle;
extern Colors colors; extern Colors colors;