Jump to content
bma

Mission scripting

Recommended Posts

Hi 

 

I'm sitting trying to make a mission script and i have run into a problem. 

 

What i want the script to do. 

Find the fire fighters at the station (Working) 

Make them walk to their locker (working) 

Kneel down(Working) 

Changing to fire fighter gear

Running to the fire trucks. 

 

My problem is the part where i want them to change to the fire fighter gear, usally this is done but just creating a new prototype and delete the old one. But i'm not sure how to make that work without using command scripts. 

Any ideas? 

 

 

The relevant code so far:

//Mission::PlayHint(PersonID);			GameObjectList gol = Game::GetGameObjects(PersonID);			GameObject *go;			if(gol.GetNumObjects()>0)	//Hvis personen ikke findes, sikres det med denne sætning at spillet ikke crasher			{				for (int i = 0; i < gol.GetNumObjects(); i++)				{					go = *gol.GetObject(i);					Person p(go);										char VOUniform[20];					snprintf(VOUniform, 20, "Station_%s", PersonID);					//Mission::PlayHint(VOUniform);					ActorList PerTarget(VOUniform);					Vector targetPos(PerTarget.GetActor(0)->GetPosition());						Game::FindFreePosition(&p, targetPos, 100.f);										p.PushActionMove(ACTION_APPEND, targetPos);					p.PushActionSwitchAnim(ACTION_APPEND, "kneeldown");					//This is as far as i got				}			}	
Link to comment
Share on other sites

I know i dont have to.

But by making it only mission script i can make some variables that works across the scripts.. which i kinda need for the rest of the script.

I know i could do it with dummys and command scripts, but i would really like to avoid it :)

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...