Guide to hacking the .lvl file to edit/add checkpoints or view the script

If you need help making a script for your level ask here.

Moderators: Main Administator, Moderator, Global Moderator

Post Reply
shmo
Administrator
Administrator
Posts: 548
Joined: Fri Nov 16, 2012 4:55 pm

Guide to hacking the .lvl file to edit/add checkpoints or view the script

Post by shmo » Sun Nov 30, 2014 7:30 pm

Just thought I'd post a guide of this in case anyone wants to know how to add checkpoints if they can only run an earlier version of inksmoto on their computer.

To add checkpoints:
    When making your level add sprites where you want checkpoints to be. Use an obscure sprite so you can find it easily later on. Once you have saved it as a .lvl open it into a text editor. In windows this is as simple as right clicking on it and selecting "open with" then selecting your favorite text editor. Open a find dialog (most programs do this with ctrl+f) and type in the name of the sprite you selected to represent a checkpoint. You should find a section of code like the following

Code: Select all

<entity id="path42696" typeid="Sprite">
		<position y="6.68033955" x="-9.8798335" angle="0.0"/>
		<param name="z" value="-1"/>
		<param name="name" value="beartux"/>
		<size r="0.4"/>
Change the spot where it says typeid="Sprite" to typeid="Checkpoint"

The section of code for your checkpoint should now look something like this.

Code: Select all

<entity id="path42696" typeid="Checkpoint">
		<position y="6.68033955" x="-9.8798335" angle="0.0"/>
		<param name="z" value="-1"/>
		<param name="name" value="beartux"/>
		<size r="0.4"/>
You can now edit the size by changing the line <size r="0.4"/> if you like and you can also remove the line <param name="name" value="beartux"/> but both of those are optional.


You can use this method of opening the .lvl file to view the script as well. This can be really useful if you are making a scripted level and want to reuse code from another level. Just look for the <script> tag near the top or use a find dialog again.
Did you know that the tip of a lighter flame smells like burnt nose hair?

Post Reply

Return to “Level Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest