Need help with traffic Scripting

Your forum for all discussions around Modding.
MinionFarmerESP
Posts: 14
Joined: Sat Sep 02, 2017 1:14 pm
Location: Barcelona / Spain

Need help with traffic Scripting

Post by MinionFarmerESP »

Hello,
First of all if there is allready a post about "how ti make traffic working in a map" than iam sorry but i havent found it.

Now my problem

I found a map "North Brabant" without any traffic on it. So i thougt it might be my game, but after seraching hours and hours i found out that it never had traffic on it.
Trying to contact the creater doesnt work, has disapeared somehow.

Well i like to add traffic.
Learned about Splines and how to add them in GE. Till this point no problem.
But how i can add the traffic script????

The Transform group is created and i placed one Spline in it.
How to edit de attributes and what to fill in the Transform Group??

Anybody can give me a hand with this? I watched a lot of tutorials en youtube but always they start with Group added end edited. Nobody did it from scratch.

Again, sorry if there is allready a post similar like mine, but havent seen it.
User avatar
Smith Modding
Posts: 2996
Joined: Sat May 14, 2016 12:42 pm
Location: Harris County, Georgia

Re: Need help with traffic Scripting

Post by Smith Modding »

Maybe take it from another map? I haven't worked on maps before (other than adding/deleting buildings) so I'm only guessing here
Smith Modding Co.
Christian Based Modding
Isaiah 30:23- He will also send you rain for the seed you sow in the ground, and the food that comes from the land will be rich and plentiful. In that day your cattle will graze in broad meadows.:
Playing FS15-19 on PC
Playing too much FS19 :mrgreen:
Specs-
i5-7300HQ|NVIDIA GTX 1050ti|16GB DDR4 RAM|1TB/500GB SSD/256GB M.2|Windows 10
MinionFarmerESP
Posts: 14
Joined: Sat Sep 02, 2017 1:14 pm
Location: Barcelona / Spain

Re: Need help with traffic Scripting

Post by MinionFarmerESP »

i will give it a try.
User avatar
da-hoffi
Posts: 519
Joined: Fri Aug 15, 2014 8:47 am
Contact:

Re: Need help with traffic Scripting

Post by da-hoffi »

I hope this may help you:

Structure:

splines
-pedestrianSplines
-trafficSplines
--parkedCars

UserAttributes:

pedestrianSplines gets the following
name="onCreate" type="scriptCallback" value="PedestrianSystem.onCreate"
name="xmlFile" type="string" value="$data/maps/pedestrianSystem.xml" (if you want to edit traffic speed etc....you can change tha path to something in your map)

trafficSplines gets the following
name="onCreate" type="scriptCallback" value="TrafficSystem.onCreate"
name="xmlFile" type="string" value="$data/maps/trafficSystem.xml" (if you want to edit traffic speed etc....you can change tha path to something in your map)

Hint: once you move your sline in those TGs you can't edit them anymore. You have to Ctrl-X them and put them in another TG to be able to again.
MinionFarmerESP
Posts: 14
Joined: Sat Sep 02, 2017 1:14 pm
Location: Barcelona / Spain

Re: Need help with traffic Scripting

Post by MinionFarmerESP »

Thanks da-hoffi
Post Reply