Afaik this is an old bug that used to happen to all levels run by Save & Run, until one of older JJ2+ releases fixed it. I checked it and it doesn't seem to have returned with this release though.

Edit: Ah, however, at least according to Trey, it occurs in plusEnscripted.j2l if you use Save & Run, so possibly also some other but not all levels.

IIRC this is a matter of filename length, like if the .j2l filename is too long it ends up bleeding into another string? Something like that. It's an old, old bug.

EDIT: Can those who are experiencing troubles with TNT not destroying destruct scenery share their plus.ini settings for ExtendedTNT and TNTDamage? I don't know if that's related to the problem, but it seems the most sensible place to start looking.

Anyway, i got a question about AngelScript:
I want to convert an integer to a string, do i need to write my own function for this or is there already a function to do this? I've searched the internet and i did found some functions, but they didn't work so i guess they aren't implanted here.

__________________
[13:07:13] *** Foly is on a KILLING SPREE!
[13:07:14] *** you killed yourself
[13:07:14] *** Foly was looking good but died instead...

I found a bug in plusJCSFun: If you die, the timer at the beginning of the level doesn't restart, so it is impossible to progress in the level. I did find a way to get the timer to start again, though: type JJK until you reach the "Continue?" screen, and select "Yes".

That's probably a j2as bug specific for the level. I figure it isn't hard to fix, but the priority is close to 0

About the downloading music stuff, this is a known issue. The same applies to palettes/tilesets (AngelScript allows you to load the palette from a different tileset). This is a rather difficult thing to fix since it's close to impossible to know which files are needed beforehand, but I guess eventually a 'download on demand' feature could solve this. But it's not easy to make such a thing (and we need to make it secure).

We've come up with that idea during development too, but it suffers from the same problem as I explained in the previous post: it's virtually impossible to let clients download such script-dependent files. So it would only work if both the server and all clients already have the respective sounds and sprites in their Jazz folder.

Theoretically, this would be possible in offline games. But it would probably take so much time to get working correctly that we'd rather spend that time on more broadly applicable features.

As can be seen in, for example, plusSurvivor, you can use existing sprites and sounds to create new objects in your levels. And as can be seen in plusEnscripted, it's possible to react according to any STATE that an object may be in by writing code for it. This way, it is in fact possible to script your own enemies or other special objects. Hell, if you've got way too much spare time you could even write a complete AI that uses the Jazz/Spaz/Lori sprites and have that running around in the level and shooting at players passing by. It's possible if you're willing to write a seriously huge script for it.

This is a rather difficult thing to fix since it's close to impossible to know which files are needed beforehand, but I guess eventually a 'download on demand' feature could solve this.

It's not all that hard if you're willing to put a little extra burden on the level designer and have them manually create a jjRequiredFilenames list or something. AS wouldn't need to know whether a given file was music, or sprites, or a palette, or what, just that it was required for the level. The only problem is that we don't have any code to work from for sending variable numbers of files to a client -- right now servers will send at most one .j2l, at most one .j2t, at most one .j2as, and at most one (skippable) music file. Adding a non-constant number of extra files would be a bit trickier, and the thing is, tools to make custom sprites for JJ2 don't even exist right now, so why bother?

It's not all that hard if you're willing to put a little extra burden on the level designer and have them manually create a jjRequiredFilenames list or something. AS wouldn't need to know whether a given file was music, or sprites, or a palette, or what, just that it was required for the level. The only problem is that we don't have any code to work from for sending variable numbers of files to a client -- right now servers will send at most one .j2l, at most one .j2t, at most one .j2as, and at most one (skippable) music file. Adding a non-constant number of extra files would be a bit trickier, and the thing is, tools to make custom sprites for JJ2 don't even exist right now, so why bother?

Well maybe not custom, but it is already possible to change current sprites: There is Jazz Sprite dynamite. that edits sprites in the Anims.j2a file. It's a bit hard to use but works perfectly. I think what zoro maybe means is to copy the Anims.j2a file from a server.

I figure if we truly were to implement this, the easiest solution would be to use some already-existing file format like GIF. Plenty of tools can make those, they are indexed (i.e. use a 256-color palette), they are small, their file format is easy (not to mention there's probably a free library for loading them) and they may include multiple images in one file.

Granted. The thing is, you'd never want to transfer an entire anims.j2a file for an individual level. It's enormous, and 90% of it would be redundant. You'd want smaller custom .j2a files with only the new sprites contained in them.

Then we can just define the extra information in the comment data. (Reading the thing myself the second time, this would void the spec since it "should not be used to store control information for custom processing". The Application Extension block is an alternative.)

Would it be easy to add the capability to set the position of a layer with an auto speed? Right now, to change a layer's auto speed without an abrupt "jump" you have to wait until certain render frames, and the gap between those frames is often several seconds.

That's a real question, not just a feature request, I honestly have no idea how this is handled internally (as you can see in mingfpack19.j2l).

Example: I'm remaking the first level of Episodic Ground Force Pack Episode 1, and I want the deadly clouds at the top to slowly move downwards when Sudden Death activates. If I just set the layer's auto Y speed to -1, they will appear to jump across (or off) the level, which is obviously not what I want.
I'm aware that this breaks if someone pauses, fortunately you can't do that in multiplayer anymore in the latest Plus...right?

Setting a pixel offest for each layer would also work, of course, and a lot more versatile, but it might be too slow to call that every frame?

(SOLVED) Is there a way to change how fast a player can run (speed)? I can change how high the player can jump (sortof with jumpStrength, you can still run and reach higher).
Edit: This code seem to work:

I tried to run a command using jjChat() in the onLevelLoad (as server), and it says "Error: Commands cannot be used while level is cycling".

Can I store custom variables for players? Or must I make my own array with player-info/objects?

Can I make the blaster have a limited set of ammo, like the other weapons?

I want to make a player fire the laser beam (with a recharge delay) without shield, possible? Think Quake3-style, or any game with a sniper.

Can I use fireball as one player and pepper spray as another player in the same server?

Can I limit the rate the player is allowed to fire a bullet (not faster than current fastfire delay, for example), no matter how fast the player is smashing the fire-key?

I want ice/tnt to heal teammates only, how can I do that with AS? I can to that with negative TNT damage and friendlyfire, but that also heals nearby teammates.

Can I disable a special move, like uppercut/superjump?

(SOLVED) I want some players to have different max-healths, in a class-based gamemode I'm making (TF2).
Edit: I call this function from a switch-statement in the onPlayer-function, with the desired maxHealth:

minmay: Planned, but not yet implemented. We ran into some trouble with layer drawing code and haven't resolved it so far.

Quote:

Originally Posted by DJazz

Works great on Linux too

Yeah, I think I figured out what your problem was before.

Quote:

I tried to run a command using jjChat() in the onLevelLoad (as server), and it says "Error: Commands cannot be used while level is cycling".

I'm... not sure what you want me to say here. The error is a true statement.

Quote:

Can I store custom variables for players? Or must I make my own array with player-info/objects?

The latter, I reckon.

Quote:

Can I make the blaster have a limited set of ammo, like the other weapons?

Probably. Do something like void onPlayer() { p.score = p.ammo[1]; } and you'll see that blaster does in fact have an ammo count, it's just that it gets reset to 100 every time it hits 0. You can hack something together from there, though it'll still display as infinity.

Quote:

I want to make a player fire the laser beam (with a recharge delay) without shield, possible? Think Quake3-style, or any game with a sniper.

Something like jjObjects[jjAddObject(OBJECT::LASER, p.xPos, p.yPos, p.playerID, CREATOR::PLAYER)].direction = p.direction; should work, though it won't show up online.

Quote:

Can I use fireball as one player and pepper spray as another player in the same server?

No.

Quote:

Can I limit the rate the player is allowed to fire a bullet (not faster than current fastfire delay, for example), no matter how fast the player is smashing the fire-key?

You could try turning noFire on and off a lot, I guess? You'd have to hack together a bullet-was-fired detection by comparing ammo count or something, though; this isn't something we have basic support for yet.

Quote:

I want ice/tnt to heal teammates only, how can I do that with AS? I can to that with negative TNT damage and friendlyfire, but that also heals nearby teammates.

Not AS-related, nor otherwise supported AFAIK.

Quote:

Can I disable a special move, like uppercut/superjump?

Not yet.

Quote:

I want some players to have different max-healths, in a class-based gamemode I'm making (TF2).

if (p.health > #) p.health = #;

Quote:

Can i make the TNT delay longer?

Almost certainly. Just find the right jjOBJ and then find the right property to edit.

Guys, Violet already answered that question and Djazz adjusted his script accordingly.
The only thing that could be improved is changing carrots into some other object temporarily so that they can't be taken when a player is on full health. That is also possible and not too difficult to script afaict.

__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement.

Amazing update! Great job Violet, Jerry and all the others who contributed to this new version. I am really enjoying the functionality AngelScript adds and looking forward to possibilities that future extensions to the scripting API will bring.

I am aware of this being the first iteration of J2AS, though I do have a few suggestions to make:
If players lack the same kind of "STATE" field that objects have, the ability to access player animations could be useful for detecting these states, as a sort of workaround.
Also, being able to use the numpad for switching weapons would be very useful, not only for alternate key configurations, but also as a sort of 8-directional input to be used with scripting.
Finally, functions to send/receive custom UDP packets from scripts would allow for proper server/client synchronization without having to use hacks such as positions or bullets to encode data to be sent to the server, but I guess this could turn to be somewhat complicated to implement properly. If that is the case, please do not consider this too much of a top priority request and focus on the more important stuff first (mainly bugfixes).

Not sure if mentioned already, but i tried Sir elementalers Day/Night script today and i couldn't last in jj2 for longer than 2 minute. fps dropped to 3 at a certain point with shortly an access violation after. Now i wanted to know what was going on, and apparently jj2 eats more and more memory over time. You start of with like 10mb memory usage for jj2. and in less than 2 minute that turns into 600mb and it just keeps raising till it's too much to handle probably. I think this memory usage raising is a major bug and should be fixed as soon as possible. With this script it actually raised around 8mb per second..