Home   Help Search Login Register  

Author Topic: script that creates all buildings (that I know of)  (Read 783 times)

0 Members and 1 Guest are viewing this topic.

SSG Plazmoid

  • Guest
script that creates all buildings (that I know of)
« on: 01 Jan 2003, 02:28:42 »
Wrote a script that creates all the building types I know of by looping through an array of building types and using createvehicle.

The script will place the buildings in a grid 9 buildings per row (after the 9th it starts over on next row). Handy way to see the buildings all at once and walk around them, in them, etc. Then you can pick the ones you like for your custom town and build it the same way. No editor addon needed.

oh yes, you need to place a gamelogic on the map named logic1 where you want the buildings to begin.

If you know of more types please let me know. Also is it possible to create trees, rocks, and bushes in this way?

enjoy,
SSG Plazmoid

script below picture


Code: [Select]
_res_buildings = ["Dum01","Dum02","Dum03","Dum04","Dum05","Dum06","Dum07","Dum08","Dum09","Dum10","Dum11","Dum12","Dum13","Dum16","Houseafbarabizna","Houseafdum_mesto2"]
_res_buildings = _res_buildings + ["Houseafdum_mesto2l","Houseafdum_mesto3","Houseafhospoda_mesto","Houseammostore2","Housebouda1","Housebouda2","Housebouda2_vnitrek","Housebouda3"]
_res_buildings = _res_buildings + ["Housebudova1","Housebudova2","Housebudova3","Housebudova4","Housebudova5","Housecihlovej_dum","Housecihlovej_dum_in","Housecihlovej_dum_mini","Housedeutshe"]
_res_buildings = _res_buildings + ["Housedeutshe_mini","Housedulni_bs","Housedum01","Housedum02","Housedum_m2","Housedum_mesto","Housedum_mesto2","Housedum_mesto2l","Housedum_mesto3"]
_res_buildings = _res_buildings + ["Housedum_mesto_in","Housedum_olezlina","Housedum_rasovna","Housedum_rasovna_in","Housedumruina","Housedumruina_mini","Housegaraz","Housegaraz_bez_tanku"]
_res_buildings = _res_buildings + ["Housegaraz_s_tankem","Househelfenburk","Househospital","Househospoda_mesto","Househruzdum","Housekostel_trosky","Houseleseni2x","Housemajak","Housemesto_dum"]
_res_buildings = _res_buildings + ["Houseplechbud","Housepumpa","Houserepair_center","Houseryb_domek","Housestanice","Housestatek_hl_bud","Housestatek_kulna","Housestodola","Housestodola_open"]
_res_buildings = _res_buildings + ["ResHouseaut_zast","ResHousebouda_plech","ResHouseChata6","ResHousedomek01","ResHousedomek02","ResHousedomek03","ResHousedomek04","ResHousedomek05"]
_res_buildings = _res_buildings + ["ResHousedomek_hospoda","ResHousedomek_kovarna","ResHousedomek_podhradi_1","ResHousedomek_rosa","ResHousedomek_ruina","ResHousedomek_sedy_bez","ResHousedomek_vilka"]
_res_buildings = _res_buildings + ["ResHousedomek_zluty_bez","ResHousedrevo_hromada","ResHousedum_patr_nizky_prujezd","ResHousedum_patrovy01","ResHousedum_patrovy01c","ResHousedum_patrovy01d"]
_res_buildings = _res_buildings + ["ResHousedum_patrovy01prujezd","ResHousedum_patrovy02","ResHousedum_patrovy03","ResHousedum_patrovy04","ResHousedum_patrovy05","ResHousedum_patrovy06"]
_res_buildings = _res_buildings + ["ResHousedum_podloubi","ResHousedum_podloubi02","ResHousedum_podloubi03","ResHousedum_podloubi03klaster","ResHousehangar_2","ResHousehasic_zbroj"]
_res_buildings = _res_buildings + ["ResHousekostelin","ResHouseOrlHot","ResHouseruiny_3_dvere","ResHouseruiny_3_prasklina","ResHouseruiny_3_roh","??ResHouseruiny_obvod_2","ResHouseruiny_obvod_3"]
_res_buildings = _res_buildings + ["??ResHouseruiny_obvod_kompl","ResHouseskola","ResHousestodola","ResHousestodola2","ResHousestodola3","ResHouseZalChata","ResHousezluty_statek","ViewTower","ViewTower2"]
_buildings = _res_buildings + ["Barracks","Housebudova3","Housedumruina_mini","Chapel001","Housebudova4","Housegaraz","Church001","Housebudova5","Housegaraz_bez_tanku","Church002","Housecihlovej_dum"]
_res_buildings = _res_buildings + ["Housegaraz_s_tankem","Church003","Housecihlovej_dum_in","Househelfenburk","Fountain","Housecihlovej_dum_mini","Househospital","FuelStationNew","Housedeutshe"]
_res_buildings = _res_buildings + ["Househospoda_mesto","FuelStationNew2","Housedeutshe_mini","Househruzdum","Hangar_Hall","Housedulni_bs","Housekostel_trosky","Houseafbarabizna","Housedum_m2"]
_res_buildings = _res_buildings + ["Housemajak","Houseafdum_mesto2","Housedum_mesto","Housemesto_dum","Houseafdum_mesto2l","Housedum_mesto_in","Houseplechbud","Houseafdum_mesto3","Housedum_mesto2"]
_res_buildings = _res_buildings + ["Houserepair_center","Houseafhospoda_mesto","Housedum_mesto2l","Houseryb_domek","Houseammostore2","Housedum_mesto3","Housestanice","Housebouda1","Housedum_olezlina"]
_res_buildings = _res_buildings + ["Housestatek_hl_bud","Housebouda2","Housedum_rasovna","Housestatek_kulna","Housebouda2_vnitrek","Housedum_rasovna_in","Housestodola","Housebouda3","Housedum01"]
_res_buildings = _res_buildings + ["Housestodola_open","Housebudova1","Housedum02","Housebudova2","Housedumruina"]

;"ResHousenabrezi","ResHouseinvisible_house","ResHousenabrezi_najezd","Dum14","Dum15"

_building_count = count _buildings

_origin = getpos logic1
_x = _origin select 0
_y = _origin select 1
_z = _origin select 2
_mycount = 0
_mycount2 = 1

#loop
_mytype = _buildings select _mycount
_vcl = _mytype createvehicle [_x,_y,_z]
_mycount = _mycount + 1
?(_mycount > _building_count):exit
_mycount2 = _mycount2 + 1

?(_mycount2 == 10):_mycount2 = 1;_x = _x + 25;_y = _origin select 1;goto "loop"
_y = _y + 25
goto "loop"
« Last Edit: 02 Jan 2003, 02:18:45 by SSG Plazmoid »

mcnils

  • Guest
Re:script that creates all buildings (that I know of)
« Reply #1 on: 01 Jan 2003, 16:01:35 »

thats cool, Plazmoid :)
but still there isnt the building i need O_O

grrr why i hawe always these impossible ideas lol
I need the castle ruins, not the resistance ones, i mean the ones like the castle over saint piere... well il make another post only for this lol.

Arkan

  • Guest
Re:script that creates all buildings (that I know of)
« Reply #2 on: 02 Jan 2003, 00:25:48 »
where can i get the create vehicle script ?

SSG Plazmoid

  • Guest
Re:script that creates all buildings (that I know of)
« Reply #3 on: 02 Jan 2003, 02:45:13 »
Thanks

Something I've been doing to see if I can find more objects is to choose an object I like in game and get it's object ID from the editor (turn on Object IDs). With that ID you can then make a dummy mission, and in the init or a trigger that's always true use this line:
Code: [Select]
hint format ["Name: %1", object 12345]where 12345 is the object ID you want to check out. You'll get the name of the object in this way.

Be aware that most of the objects you see on the map are static and to my knowledge can't be placed using createvehicle. Your ruins may be in that category.


thats cool, Plazmoid :)
but still there isnt the building i need O_O

grrr why i hawe always these impossible ideas lol
I need the castle ruins, not the resistance ones, i mean the ones like the castle over saint piere... well il make another post only for this lol.