View Single Post
  #8  
Old 08-27-2014, 09:54 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by samich View Post
You can change level links via script? How would you go about doing that, if you don't mind me asking? I haven't done much level manipulation via script.
You have like a template level. You always load that one file as a text (using loadLines() or whatever you want to use) and have the script look for a certain warp you want to manipulate (lets say the format is 'LINK 30 30 some_level.nw' ; I'm not too sure didn't check it). After you've found that / them, you simply alter the Level name like:

PHP Code:
temp.newlevel "new_level.nw";
temp.line yourFoundLINKLocationInsideTheFile.tokenize();
//          LINK             x                y                levelname
temp.line temp.line[0SPC temp.line[1SPC temp.line[2SPC temp.newlevel 
and save those edited lines via saveLines() as a new level. Make sure to keep your level template unedited - it's a template

TBH I've never really tried editing the links directly like that, but that's the way that I can think of right now. Probably would end up changing it all again
__________________
MEEP!
Reply With Quote