Jump to content
anonym

Mission Script problem need help

Recommended Posts

i have a problem. when the counter of the victim is 0 there should come a cutscene. but there come this error:

sriptfehler7wob6xlm3v.jpg

in German:

ich habe ein problem. Wenn der Zähler der opfer auf 0 ist, sollt eigentlich eine Cutscene kommen. aber es kommt diese Fehlermeldung:

sriptfehler7wob6xlm3v.jpg


const char OBJECTIVE_B[] = "Bringen Sie alle verletzten und toten Personen ins Krankenhaus";

const float TAHOE01_SPEED = 0.0f;
const int TIME_TAHOE01_BLOCKED = 3;
const float TAHOE02_SPEED = 0.0f;
const int TIME_TAHOE02_BLOCKED = 3;
const float TAHOE02_SPEED = 0.0f;
const int TIME_TAHOE02_BLOCKED = 3;
const float FRACTION_OF_MAX_INJURED = 1.0f;
const char NAME_TAHOE_01[] = "tahoe01";
const char NAME_TAHOE_02[] = "tahoe02";
const char NAME_TAHOE_03[] = "tahoe03";
const char NAME_TAHOE_01_PATH[] = "Tahoes";
const char NAME_TAHOE_02_PATH[] = "Tahoes";
const char NAME_TAHOE_03_PATH[] = "Tahoes";

object Mission31 : MissionScript
{
Vehicle mTahoe01,mTahoe02,mTahoe03;
Path mTahoes;



Mission31()
{}
~Mission31()
{}
void Start()
{
PathList pathList1(NAME_TAHOE_01_PATH);
mTahoes = pathList1.GetPath(0);
PathList pathList1(NAME_TAHOE_02_PATH);
mTahoes = pathList1.GetPath(0);
PathList pathList1(NAME_TAHOE_03_PATH);
mTahoes = pathList1.GetPath(0);
GameObjectList GetGameObjects(const char *mTahoe01_);
GameObjectList GetGameObjects(GameObjectType mTahoe01_);


GameObjectList listAll = Game::GetGameObjects();
for(int i = 0; i < listAll.GetNumObjects(); i++)
{
GameObject *obj = listAll.GetObject(i);
if (obj->HasName(NAME_TAHOE_01))
{
mTahoe01 = Vehicle(obj);
mTahoe01.SetCollisionResponseByForces(5.0f);
}
if (obj->HasName(NAME_TAHOE_02))
{
mTahoe02 = Vehicle(obj);
mTahoe02.SetCollisionResponseByForces(5.0f);
}
if (obj->HasName(NAME_TAHOE_03))
{
mTahoe03 = Vehicle(obj);
mTahoe03.SetCollisionResponseByForces(5.0f);
}

}
Mission::AddObjective(OBJECTIVE_B);
Mission::SetObjectiveAccomplished(OBJECTIVE_B, false);

}
MissionState GetMissionState()
{

if (Mission::GetCounter("Injured Persons") + Mission::GetCounter("Dead Persons") == 0)
{
if (!Mission::IsObjectiveAccomplished(OBJECTIVE_B))
{
Mission::SetObjectiveAccomplished(OBJECTIVE_B, true);
} else
{
Mission::SetObjectiveAccomplished(OBJECTIVE_B, false);
}

if (Mission::IsObjectiveAccomplished(OBJECTIVE_B))
Mission::StartCutScene();
mTahoe01.SetObjectPath(NAME_TAHOE_01_PATH, TAHOE01_SPEED);
Camera::FollowTarget(&mTahoe01, 0, 0, 0, true);
Camera::LookAtTarget(&mTahoe01, true);
Camera::Rotate(-10000, 0, 0, -22);
Mission::ShowBlackBars();
return MISSION_SUCCEEDED;
}
return MISSION_RUNNING;
}
};

who can help me?what is wrong with the script?

ps.:sorry for my bad english

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...