object driving_through_winterberg : CommandScript { driving_through_winterberg() { SetIcon("ego"); SetCursor("ego"); SetPriority(2000); } bool CheckTarget(GameObject *Caller, Actor *Target, int code) { Vehicle v(Target); return Target->GetType()==ACTOR_VEHICLE && v.GetNumPassengers()>1; } void PushActions(GameObject *Caller, Actor *Target, int code) { Vehicle v(Target); Vector l,pos,r; v.GetOrientedBBoxPoint(6,l.x,l.y,l.z); v.GetOrientedBBoxPoint(7,r.x,r.y,r.z); pos=v.GetPosition(); pos.z=l.z+100; Camera::Set(pos); Camera::LookAt(r,l); if (code) { Caller->PushActionWait(ACTION_APPEND,0.1); if (v.IsSelected()) Caller->PushActionExecuteCommand(ACTION_APPEND,"driving_through_winterberg",Target,1,false); } else { float x,y,z; Camera::GetRotation(x,y,z); Camera::SetRotation(z+180,20,0); Camera::ZoomInTo(2000.0); PersonList pl=v.GetPassengers(); if (pl.GetNumPersons()>1) pl.GetPerson(1)->PushActionExecuteCommand(ACTION_APPEND,"driving_through_winterberg",Target,1,false); v.Select(); Caller->Deselect(); } } };