Jump to content
Chris07

Tiller Parking

Recommended Posts

I've spent hours trying to get the tiller to park correctly in my mod. The map is based on the New Freeplay Map from LA Mod. I am attempting to park the Tiller in bay #2 of the large fire station. I have virtual objects and such set up, however, the behavior is not what is expected take a look:

 

Here is a diagram of how I have the Virtual Objects set up.

 

Note...I have invisible barriers inside the station to prevent

 

Here are the important lines of code:

Gather the location of the Virtual Objects (Tiller is called "Quint")

 

Tell the Tiller to go to the FirstPoint then to the parking spot "Park".

 

The goal was to position the tiller in front of the back door and give it clear line of sight to the parking spot. However, the tiller goes in backwards instead of going straight in. Here is a video of what happens when the command in executed.

 

Any help on this would be very much appreciated!

 

 

Script file is attached just in case you need to look at it.

LAToFireStation.txt

Link to comment
Share on other sites

If that is the whole script, you left out the entire second half other script related to:

object DummyCheckParked : CommandScript

There is a section in there that looks like this:

if(l1.GetNumActors() > 0)			{				if (StrCompare(v.GetPrototypeFileName(), OBJ_TILLER) == 0)				{					Vector Park = l1.GetActor(0)->GetPosition();					float dx = 125.f, dy = 0.f, dz = 0.f;						float r[9];						float childr[9];					v.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]);					Math::RotateVector(dx, dy, dz, r);					Math::EulerToMatrix(0.0f, 0.f, 0.f, childr);					Math::MultiplyMatrices(childr, r);					Park = Park + Vector(dx, dy, 0);				} else				 Vector Park = l1.GetActor(0)->GetPosition();			}

And I believe that is part of the problem. Honestly, from what I see in your script, you are over complicating a lot of things with the actor list stuff. Also you seem to be missing the VOs for the gates. From what I can see you have a lot of stuff working against you script wise. I would add the gate VOs and start with a completely fresh LAtoFireStation script and only remove what you need and change what you need.

Link to comment
Share on other sites

Thanks! I'll probably just redo the entire toFireStation.script starting with an LAMod copy. This copy here is a HEAVILY modified version (not made by me). I will probably start over for simplicity's sake.

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