bma Posted September 5, 2014 Report Share Posted September 5, 2014 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 gearRunning 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 } } Quote Link to comment Share on other sites More sharing options...
Chris07 Posted September 5, 2014 Report Share Posted September 5, 2014 There is no reason you can't use a command.Scripting for commands is a subset of scripting for missions. If you create a change clothes command you can just call it using the Game::ExecuteCommand() function. Quote Link to comment Share on other sites More sharing options...
bma Posted September 5, 2014 Author Report Share Posted September 5, 2014 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 Quote Link to comment Share on other sites More sharing options...