console scripts

  • sevonofnine
    13th Mar 2011 Member 0 Permalink
    i am trying to start a saved script using the console but it just comes up with "scripts are not enabled"
    i am using 46.4
  • ClaymoreTF2
    13th Mar 2011 Member 0 Permalink
    this is a glitch.
  • sevonofnine
    13th Mar 2011 Member 0 Permalink
    will that be fixed
  • ClaymoreTF2
    13th Mar 2011 Member 0 Permalink
    @sevonofnine
    I think i will be in new version.
    Also, what it's in you script?
  • sevonofnine
    13th Mar 2011 Member 0 Permalink
    if temp #329 9000 c
    set type dstw neut
    else
    reset pressure
    endif
  • ClaymoreTF2
    13th Mar 2011 Member 0 Permalink
    @sevonofnine
    try to PM to Simon Or Cracker64 Or even jacksonmj
  • jacksonmj
    13th Mar 2011 Developer 0 Permalink
    Running console commands from a file is currently disabled by default.

    https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=4486
    Create a shortcut to your powder toy, and in the command line arguments (where you put scale:2) put ' scripts '
  • Videogamer555
    13th Mar 2011 Member 0 Permalink
    Problem with scripts is they seem to give a "particle can't be created error" sometimes. It seems it can't generate any more than a certain number of particles in a single script? Please let me know what's going on here.
  • jacksonmj
    13th Mar 2011 Developer 0 Permalink
    @Videogamer555
    Powder Toy can handle up to 235008 particles.
    That error will also occur if you try to put two particles in the same place.
  • Videogamer555
    13th Mar 2011 Member 0 Permalink
    I used visual basic to generate a script file that when run produces a square (of dimensions 100x100) block of alternating particle types (WOOD and METL). The script looks like this.

    create wood 0,0
    create metl 1,0
    create wood 2,0
    create metl 3,0
    ... and so on for the remaining pixels of row 0

    create metl 0,1
    create wood 1,1
    create metl 2,1
    create wood 3,1
    ... and so on for the remaining pixels of row 1

    and so this pattern continues for all the rows


    Because it was generated by 2 nested for-next loops (one vertical and one horizontal) in Visual Basic, there is NO possibility of human error that might cause the same point to be plotted twice.

    However when running the script in TPT, after completing row 0 and going most of the way through row 1, it stops, but doesn't even generate an error (though sometimes it would give the error about not being able to generate a particle). Is TPT limited in the number of lines of code that it can read from a script?

    Please help me.