Jump to content

Recommended Posts

Make sure to use the new version called Buldozer Tools

 

 

Improved editor.sqs

 

This is an Improved version of the editor.sqs which can be used to execute code within buldozer.

You can load and reload roads.shp while being in buldozer, additionaly it removes rain and sets the time to midday.

This means, no more buldozer restarting for road adjustments and for the addicts no more rain and night.

 

The key to execute the script is * on the NUMPAD, you can change the DIK in the script by editing the key variable.

 

1. Paste the code in your P:\scripts\editor.sqs

2. Make sure to set your path to your roads directory correctly

3. Make sure your road files are in the respective directory

4. Load up your buldozer and wait until you see your map

5. Press * [NUM], the reload should be quick but can get longer with extremely big and complex road networks

 

P:\scripts\editor.sqs

; editor.sqs by Lappihuan and Sumrak
; due to sqs syntax the single line must be kept! https://community.bistudio.com/wiki/SQS_syntax

; key to execute the script is * [NUM]

; roadpath: is the path to your roads directory in your project.
; dateArray: https://community.bistudio.com/wiki/setDate
; key: https://resources.bisimulations.com/wiki/DIK_KeyCodes

roadpath = "P:/mytag/mymap/data/roads/";
dateArray = [2001, 06, 22, 12, 0];
key = 55;
_bulKeybinds = [] spawn {keyBind = (findDisplay -1) displayAddEventHandler['KeyDown','if(_this select 1 == key)then{result = buldozer_LoadNewRoads roadpath;setDate dateArray;0 setRain 0;0 setOvercast 0;}']};

You are free to use and edit this script how you like.
If you have any bugs, suggestions or improvements please post them here.
If you have or are about to make a tutorial, feel free to include the script in the source data.

 

Thanks to Sumrak for pointing me out that display event handlers work in buldozer and providing a example code.

 

I'm happy to see what you guys can come up with.

Kind regards,
Lappihuan

  • Like 4

Share this post


Link to post
Share on other sites

Edited the code as i somehow had a typo in the "buldozer_LoadNewRoads" command.

Share this post


Link to post
Share on other sites

Thanks to Sumrak for pointing me out that display event handlers work in buldozer and providing a example code.

 

WOW! I tried this a year ago when I tried to add MapBuilder to buldozer and failed. I just didn't think of using findDisplay -1.

 

BTWYou can spawn SQF code from sqs ;)

Share this post


Link to post
Share on other sites

WOW! I tried this a year ago when I tried to add MapBuilder to buldozer and failed. I just didn't think of using findDisplay -1.

 

That was a info from Sumrak, so kudos to him ;)

BTWYou can spawn SQF code from sqs ;)

Does that mean, one could have a my_sqf_script.sqf in P:\scripts and spawn it from the editor.sqs?

That would be very nice!

Share this post


Link to post
Share on other sites

Does that mean, one could have a my_sqf_script.sqf in P:\scripts and spawn it from the editor.sqs?

That would be very nice!

 

Yes, I have a loadRoads.sqf that is called from editor.sqs.

 

Maybe it is time to request terrain manipulation/object creation commands for buldozer.

Share this post


Link to post
Share on other sites

Maybe it is time to request terrain manipulation/object creation commands for buldozer.

I wonder if the bd functions are writen in sqs so one could replace them.

Edit: isn't there a sqf command to list all running scripts?

Share this post


Link to post
Share on other sites

I had a neat little idea and made a ticket about it: https://feedback.bistudio.com/T116749

Nice idea!

But as you stated before, this should come with commands like buldozer_getSelectedObejcts, buldozer_selectObject, buldozer_createObject, buldozer_setVectorUpAndDir and so on..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×