LUA TNT Demo - Game/Script Interaction

  • Cr15py
    30th Jul 2011 Member 0 Permalink
    Intro:
    I made this demo for fun, because we don't have many LUA Scripts, and to demonstrate their usefulness to add special functionality to saves. The script and save the script is to be used with are at the end of the save.

    Instructions:
    NOTE: Quoted text should not be entered as quoted unless otherwise specified, it is quoted to make it apparent that it is the text in question
    1) Save the file in your Powder Toy folder as "Dynamite.lua".
    2) Open Powder Toy by double-clicking.
    3) Press the key labeled "~"(or "`").
    4) Type the following text(including quotes inside quotes) "dofile("Dynamite.lua")".
    5) Now press the ENTER key.
    6) Now, if the game is paused, unpause it.
    7) Select SPRK from Electronics.
    8) Spark the handle of the detonator shown in the upper right corner of the game.
    9) Wait for the fuse to burn down!
    10) Explosions teehee! ;)

    Required Files and Saves:
    You can find the script here: http://min.us/myTNTDemo

    You can find the save here:
  • pilojo
    30th Jul 2011 Member 0 Permalink
    I'll try it.

    EDIT: NO POWER! it cant break goo D: great script though.
  • BloodLust
    30th Jul 2011 Member 0 Permalink
    Mine just says an error msg ( in console ) of "cannot open dynamite.lua:No such file or directory found

    do you have to save it in something OTHER than the wordpad thing or have i misnamed something?
    EDIT: wait i may be on to something...im now trying actually dowloading the file from site XD
    EDIT:EDIT: yup it appears to have worked :P
  • The-Con
    30th Jul 2011 Member 0 Permalink
    @Cr15py (View Post)
    That is quite awesome.

    I just copied it into notepad (it was notepad++) and it worked fine when I saved it. I tend to do things the harder way.
    Now I have to really learn lua, not just the basics -_-
  • boxmein
    30th Jul 2011 Former Staff 0 Permalink
    BloodLust, WordPad is a formatted text editor. It makes characters in the head of the file that are read by WordPad or other rich text editors as different forms of text, for example bold or italic or different sized text.
    Notepad, on the other hand, is a plain text editor. It shows the file as is.
  • rileybogan
    30th Jul 2011 Member 0 Permalink
    its saying
    cannot open dynamite.lua: permission denied
    HELP please
  • BloodLust
    30th Jul 2011 Member 0 Permalink
    @boxmein (View Post)
    yea i ment notepad i jsut couldnt remember the name atm XD
  • Vou
    30th Jul 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • rileybogan
    30th Jul 2011 Member 0 Permalink
    @Vou (View Post)
    do you get it?
  • Cr15py
    30th Jul 2011 Member 0 Permalink
    WOW! Thanks for the great feedback guys! I'm probably gonna be releasing something else for you guys soon. n_n