How do I write a large file? [Probably Complicated]

Get help using Construct 2

Post » Mon Jun 20, 2016 12:59 am

So I want the program to write a file, the output looking something like

Code: Select all
viewsettings
{
   "bSnapToGrid" "1"
   "bShowGrid" "1"
   "bShowLogicalGrid" "0"
   "nGridSpacing" "64"
   "bShow3DGrid" "0"
}
world
{
   "id" "1"
   "mapversion" "1"
   "classname" "worldspawn"
   "skyname" "sky_halflife3a"
   "maxpropscreenwidth" "-1"
   "detailvbsp" "detail.vbsp"
   "detailmaterial" "detail/detailsprites"
   solid
   {
      "id" "2"
      side
      {
         "id" "1"
         "plane" "(-128 128 0) (128 128 0) (128 -128 0)"
         "material" "HL3/GROUNDSNOW02"
         "uaxis" "[1 0 0 0] 0.25"
         "vaxis" "[0 -1 0 0] 0.25"
         "rotation" "0"
         "lightmapscale" "16"
         "smoothing_groups" "0"
      }
      editor
      {
         "color" "0 144 145"
         "visgroupshown" "1"
         "visgroupautoshown" "1"
      }
   }
}
entity
{
   "id" "10"
   "classname" "prop_static"
   "angles" "0 0 0"
   "fademindist" "-1"
   "fadescale" "1"
   "model" "models/props/d1_crash/hl3copter/helicopter_destroyedamdl"
   "renderamt" "255"
   "rendercolor" "255 255 255"
   "skin" "1"
   "solid" "6"
   "origin" "0 0 0"
   editor
   {
      "color" "255 255 0"
      "visgroupshown" "1"
      "visgroupautoshown" "1"
      "logicalpos" "[0 500]"
   }
}
cameras
{
   "activecamera" "-1"
}
cordons
{
   "active" "0"
}


But...

Consider the view settings,world,entity,ect. as separate "tabs" that can have more information posted in-between them.

As in "entity" can have 5 similar looking things, but not at the end, only in that tab. These similar looking "things" can be the sane but have different information in them, so it could also look like this

Code: Select all
side
      {
         "id" "1"
         "plane" "(NUMBERS) (DIGITS) (NUMERALS)"
         "material" "PUTSOMETHINGHERE"
         "uaxis" "[1 0 0 0] 0.25"
         "vaxis" "[0 -1 0 0] 0.25"
         "rotation" "0"
         "lightmapscale" "16"
         "smoothing_groups" "0"
      }
side
      {
         "id" "1"
         "plane" "(-128 128 0) (128 128 0) (128 -128 0)"
         "material" "SOMETHINGDIFF"
         "uaxis" "[1 0 0 0] 0.25"
         "vaxis" "[0 -1 0 0] 0.25"
         "rotation" "0"
         "lightmapscale" "16"
         "smoothing_groups" "0"
      }

And after ALL THAT... write a file containing the information.
Is this possible?
B
22
S
6
Posts: 21
Reputation: 1,321

Post » Mon Jun 20, 2016 1:32 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: Kyatric and 32 guests