Jump to content
Xplorer4x4

m.SetRotation

Recommended Posts

Wll heres a snippet:

		ActorList l16 = Game::GetActors(VO_ENGINE01);
for(int i=0; i < l16.GetNumActors(); i++)
{
Vector Engine01 = l16.GetActor(0)->GetPosition();
Vehicle m = Game::CreateVehicle(OBJ_ENGINE01, UNNAMED);
m.EnableBlueLights(false);
m.SetPosition(Engine01);
m.SetRotation(gate4);
m.UpdatePlacement();
m.SetMaxPassengers(6);
m.SetSpeed(9.0f);
m.PushActionWait(ACTION_NEWLIST, 3.0f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 1, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 1, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 3, false);
m.PushActionWait(ACTION_APPEND, 1.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 3, false);
}

Link to comment
Share on other sites

Guest Francis

http://pastebin.com/S2vkudbp

Pastebin ok? To lazy to zip :P

Alright, try that one:

http://pastebin.com/qBmgvAnA

I made it rotate to gate6b instead of gate6a. I added the following code:


GameObjectList gate06b = Game::GetGameObjects(NAME_GATE06B);
for(int i=0; i < gate06b.GetNumObjects(); i++)
GameObject *gate6b = gate06b.GetObject(i);

After this one:


GameObjectList gate06a = Game::GetGameObjects(NAME_GATE06A);
for(int i=0; i < gate06a.GetNumObjects(); i++)
GameObject *gate6 = gate06a.GetObject(i);

Then, I changed these on both brush_truck.e4p and cv_ems2.e4p:


m.SetRotation(gate6);

To my newly created Game Object gate6b:


m.SetRotation(gate6b);

Tell me if it works how you want 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...