Jump to content
Xplorer4x4

Random Unit Script

Recommended Posts

Ok I was thinking, our police department,much like many others I am sure, use several diffrent colored slick top cars. For example they have a dark blue slick top Imapala, but they also have a Green slick top Imapala, and even a Maroon colored slick top Imapala. Slicktop may not be the proper terms actually as there none marked units, some have the tear drop spot light built in the car, others dont. Same applies for Crown Vics here. They use plain white units and plain gold units, among other colors I am sure I just dont recall them off hand.

Now anyways my point is rather then adding a icon in the dispath menu for a red imapala, green impala, and a blue impala, would it be possible to write a script that would randomize the selection proccess so that if you dispatch a slick top imapla you may get a red,blue,or green unit instead of clicking red impala, green imapal, blue impala, and so forth in the dispatch menu?

Would some one be willing to attempt such a script if this is possible?

Link to comment
Share on other sites

Guest blwoods0

I think it would be possible. IIRC, there is a submod around here somewhere that does exactly that, however it was just the numbers on top of the cars. Not 100% sure though.

Link to comment
Share on other sites

Theoretically, yes it can be done... What you would have to do to make this work in freeplay is to make some type of trigger, like a button on a console (like the LA Mod Uses forthe fire station) that would activate a script that would then check for the vehicle's presence in a certain location, if the vehicle is present to randomize between prototypes this or this or this etc... They would all be the same car basically but in the end the unmarked unit for example, would require a model and DDS for each varient, the UI buttons, the Prototypes, etc.. Whether or not you could leave it out of the purchase menu, I believe so but I am not 100% on that. Basically the idea is that you'd catch the car in the virtual location box before it left the PD, and change it to whatever random colors might be there IF that button was activated and the script was told to repeat it's self indefinately.

This could, however cause problems in several ways, for one the vehicle may come out correct but will not go back to base properly with the script running unless you were careful in the way that a vehicle entered the map and left the map, if it were to happen in the same location the vehicle would switch and re-spawn at the entrance to the PD... It might cause memory dump issues where it starts taking excessive memory just to randomize the color of a car. General crashes could result from this type of behavior, which is highly possible to happen. On a Mission this is relatively easy to do, and generally possible, but in freeplay you need a "trigger" to cause the event, which would have to be activated by the user, and generally the game does not like running these types of events repeatedly.

In my opinion it would be more worthwhile to put time into other things that might improve the gameplay, but if you wish to do it, this would probrably be the most likely way to get it done with a minimum of problems. I am not sure if it would be stable at all but this is the way that might work.

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