Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Converting


Lithumist
 Share

Recommended Posts

We were told early in production that EE2.7 maps will be compatible with EE3.0 maps.  Whether or not that's still true after the port into Java, I do not know.

As for scripts, they will have to be converted because the syntax is C-type now, and not Basic.

For instance, here is the OnDeath sub I'm using in the Main.txt:
```
' Executes whenever somebody dies outside of an arena.
Sub OnDeath(Index)
Dim MapNum
Dim ClassID
Dim X
Dim Y

If GetMapBootMap(Index) > 0 Then
Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
Else
ClassID = GetPlayerClass(Index)

MapNum = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "Map")

X = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "x")
Y = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "y")

Call PlayerWarp(Index, MapNum, X, Y)
End If
End Sub
```
In EE3.0, it would be this:
```
#include
function OnDeath(Index)
{
var MapNum;
var ClassID;
var X;
var Y;
var Z;

if (sadscript.GetMapBootMap(Index) > 0)
sadscript.PlayerWarp(Index, sadscript.GetMapBootMap(Index), sadscript.GetMapBootX(Index), sadscript.GetMapBootY(Index), sadscript.GetMapBootZ(Index));
else
{
ClassID = sadscript.GetPlayerClass(Index);

MapNum = sadscript.GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "Map");

X = sadscript.GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "x");
Y = sadscript.GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "y");
Z = 0;

sadscript.PlayerWarp(Index, MapNum, X, Y, Z);
}
}

```

Warning - while you were typing 2 new replies have been posted. You may wish to review your post.
Link to comment
Share on other sites

@Smallbro:

> link=topic=45328.msg460465#msg460465 date=1243688218]
> And isn't there something new about the graphics though?

There's afew new things with the maps and graphics (having about 50+ new layers, different attribute system, etc), that's why I'm not sure if the maps are still convertible (you'll have to get it straight from HM).

But that reminds me, I should add the "z" axis to that script above
*edits script*
Link to comment
Share on other sites

@Admiral:

> There's afew new things with the maps and graphics (having about 50+ new layers, different attribute system, etc), that's why I'm not sure if the maps are still convertible (you'll have to get it straight from HM).
>
> But that reminds me, I should add the "z" axis to that script above
> *edits script*

What is the "z" axis for?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...