Feb 5, 2013, 06:53 AM | |
The only thing I don't like is that when you commit a mistake in the code, you aren't notified of which line and which position your mistake is, nor you are notified of what the expression should be.
eg. "Error at line 3 at position 19: Missing brackets" or "Error at line 4 at position 14: Unknown variable "healtj"" |
Feb 5, 2013, 06:58 AM | |||
Quote:
Quote:
__________________
WebJCS 2 (new and in progress) WebJCS 1 (old but complete) SGIP Simple Games in Progress list Level Packer v2 - With a GUI! PHP Tileset Compiler |
Feb 5, 2013, 07:01 AM | |
Oh ... Sorry ... mistake of mine. I never read the ChatLog, you know.
|
Feb 6, 2013, 06:36 AM | |
I guess this thread can still be used for some advertising of code snippets:
http://www.jazz2online.com/snippets/50/boomerang-gun/ This is a script that changes the powered up blaster into a boomerang gun. Nothing much more to say about it, you'll see how it works if you try it ![]()
__________________
[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... |
Feb 6, 2013, 01:43 PM | |
Basic code for subdividing a level into mini-rooms, as in Oddworld games:
if (p.xPos > 0) if (p.xPos < 640) if (p.yPos > 0) if (p.yPos < 480) p.cameraFreeze(0, 0, false, true); if (p.xPos > 640) if (p.xPos < 1280) if (p.yPos > 0) if (p.yPos < 480) p.cameraFreeze(640, 0, false, true); if (p.xPos > 0) if (p.xPos < 640) if (p.yPos > 480) if (p.yPos < 960) p.cameraFreeze(0, 480, false, true); if (p.xPos > 640) if (p.xPos < 1280) if (p.yPos > 480) if (p.yPos < 960) p.cameraFreeze(640, 480, false, true); And so on ... |
![]() |
Violet CLM |
This message has been deleted by Violet CLM.
|
Feb 6, 2013, 10:09 PM | ||
Quote:
Code:
void onPlayer() { p.cameraFreeze(p.xPos-p.xPos%640,p.yPos-p.yPos%480,false,true); }
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |
Feb 7, 2013, 01:16 AM | |
Thank you for your help. I didn't know the % could be used for symmetric number skips.
Hey! I won't need that "rest" custom option anymore, since I can use "if (jjGameTicks = jjGameTicks%700)" for things happening every 10 seconds! I have sooo much to learn yet... |
Feb 7, 2013, 01:29 AM | |
You can also use "if (jjGameTics % 700 == 0)", saves you half the typing. Also, you'll need to use '==' for comparing
![]()
__________________
|
Feb 7, 2013, 01:47 AM | |
Thank you for your advice. Besides, the other expression did not work!
|
Feb 7, 2013, 03:32 AM | |
Ah, on second thought your expression wouldn't work indeed. The 'jjGameTicks%700' part would only produce numbers 0-699. It would evaluate to true every gametick for the first 10 seconds, and to false ever after that.
__________________
|
Feb 9, 2013, 10:08 AM | |
Yeah, that one's definitely planned for inclusion, though I hadn't gotten around to it yet, mostly because gem rings are so much more difficult to do that for.
(If you leave var[0] at 0, do they act as coins? I forget how flexible that code is.) |
Feb 9, 2013, 10:20 AM | |
A bit. Their colors go disco and on being collected they show how many coins you have, but won't add to the amount.
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |
Feb 10, 2013, 03:46 AM | |
Haha, nice one. We don't need to enhance any more events in Plus, people will do it through scripts!
![]()
__________________
|
Feb 10, 2013, 10:56 AM | |
I'll admit I'm hoping someone will figure out for us what Auto Fire and Max Weapon should do as useful events.
|
Feb 10, 2013, 04:59 PM | |
I always pictured Max Weapon as a power-up box that powered up all your weapons and gave them maximum ammo, just like jjgod without the invincibility. That's just my guess as to what it was originally supposed to be like, though, not a suggestion for what would be a good new event (it wouldn't be a good new event IMO).
Personally I'd just leave them nonexistent and save the JCS.ini space for completely new cool events later. P.S. Jerrythabest: did you add a mod pattern jump function yet? =P edit: oops offtopic thought this was the actual JJ2+ thread somehow |
Feb 10, 2013, 09:53 PM | |
Never heard about that event, but intuitively I'd agree with minmay, except that I'd say without powerups (because of the difference between jjgod and jjammo). I'd probably also limit the ammo received to the kinds of ammo that are already present in the level.
|
Feb 10, 2013, 11:44 PM | |
Sounds much like a /ready box to me!
![]() @minmay: I haven't looked into the sound stuff at all, so I'm still clueless about how I would do this. I'm focussing more on graphics at the moment ![]()
__________________
|
Feb 11, 2013, 03:43 AM | |
The fault if I got a bad rating for "River Secrets" is partly mine, ofcourse, but it is also because of a lot of missing commands in Angel Script.
Now, I don't know if they will ever be included, nor I know if it's POSSIBLE to include them, and I don't EXPECT them to be created, but if they can be, there they are: - A command for deactivating special moves (one for JUMP JUMP and one for DUCK JUMP) - A command for deactivating running mode ("ERR: Reference is read-only) - One for deactivating buttstomp - Checking and alterating what Jazz and siblings do ("ERR: "state" is not a member of "jjPlayer") - Making the ammo pickups give you more or less ammunition (I tried var[0-100] unsuccessfully) - Making some enemies hurt you more than 1 HP - Making the max health higher or lower than 5 even in SP mode - Maybe also making the maximum ammunitions higher than 99 (I had no problem making them LOWER than 99) - Making the blink time higher or lower (in my case 0) even in SP mode - A command for deactivating direction changes in midair (if the player isn't standing on the ground or a platform, the direction keys do nothing) |
Feb 11, 2013, 08:23 AM | ||||
Quote:
Pseudocode/code: if (p.xSpeed > value) p.xSpeed = value; if (p.xSpeed < -value) p.xSpeed = -value; p.jumpStrength = othervalue; Or you can use speed = sqrt(p.xSpeed^2 + p.ySpeed^2) and limit that one, it all depends on how you want it to be limited. Quote:
In multiplayer use jjChat("maxhealth x"), i don't know if this works in sp too. Quote:
As for the other stuff, i don't think it's possible yet to do this in AngelScript, correct me if i'm wrong ![]()
__________________
[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... |
Feb 11, 2013, 09:13 AM | ||
Quote:
Code:
if(p.invincibility<0) { p.invincibility=0; }
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |
Feb 12, 2013, 07:18 AM | |
Indeed, I tried the Invincibility cheat, but it resulted to change the invincibility given from the carrots (the one with the translucent circumferences around Jazz), not the blink time.
I just need to know all the expressions it's possible to find in AngelScript, and their exact meaning. I'm too lazy to test them one by one until I find what I need (IF it exists), and I hope someone will add some more expressions and make a simplified version of the AngelScript someday. Oh, by the way, the AngelScript manual says "jumpSpeed" instead of "jumpStrength". I hope it was fixed already. |
Feb 12, 2013, 08:24 AM | |
Uh, so I assume that invincibility going below 0 when you get hurt is a random artifact. The game changes the value but doesn't read it. Surprisingly, "/noblink on" doesn't work in SP either. Feels like somebody worked really hard to make changes on that front difficult.
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |
Feb 12, 2013, 12:22 PM | |||||
Quote:
Quote:
Quote:
Quote:
|
Feb 12, 2013, 12:34 PM | |
Before the Jan 28th release, commands were only available in online games. They have been written for and tested with online games exclusively. Their availability in offline games is a side effect of the new menus and of the AngelScript API. We haven't come to fixing that yet, which means many commands don't work properly offline (neither through AngelScript nor through the menus). This is a thing on the to-do list.
__________________
|
Feb 12, 2013, 12:59 PM | |
Oh, don't mind that, "somebody" was actually meant to point to an abstract entity, I didn't mean to criticize your work. I just figured out that most MP commands would work in SP as a side-effect of the independent implementations of them and the menus you mention, so I was surprised noblink doesn't. But I acknowledge the situation Plus is in and understand that some features don't yet work as expected or planned.
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |
Feb 12, 2013, 02:03 PM | |
Oh, no worries, I didn't interpret your post as being offensive or anything. Just decided I'd explain how this happened
![]() In fact, we even had the menu items available to admins for a few hours. But that turned out to be so extremely buggy that we've decided to disable them for now.
__________________
|
Feb 16, 2013, 09:42 PM | ||
Quote:
![]() Number of objects in screenshot: three. |
Feb 17, 2013, 12:57 AM | |
Oh wow. OH WOW.
__________________
|
Feb 21, 2013, 12:57 PM | |
Uhm, last time I explained a way of converting integers into strings I didn't mention an even simpler way that also works. I actually did it on purpose, because personally I consider it a rather ugly way, but I just realized that some of you might want to choose it as it takes much less space and doesn't require memorizing a function name. There goes:
Code:
""+value Code:
void onPlayer() { jjChat(formatInt(jjGameTicks,"l")); } Code:
void onPlayer() { jjChat(""+jjGameTicks); } Side note: Assignment in this manner is also allowed, that is, for example, if you use the following code: Code:
string name=555; Oh, right, and I should mention it works fine with floats too.
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. Last edited by Sir Ementaler; Feb 21, 2013 at 01:16 PM. |
Feb 21, 2013, 01:55 PM | |
Hey, those things remind of PHP. Really, the AngelScript guy (what was his name again?) is less strict than I'd expected at first.
__________________
|
Feb 21, 2013, 02:26 PM | |
Of course, a benefit of formatInt is that it lets you use hexadecimal notation, or padding zeroes, or other such, depending on your specific needs.
|
Feb 22, 2013, 07:01 AM | |
You know what would be useful? A reverse-lookup for enums. Like
Code:
jjEnum(2, WEAPON::Weapon);
__________________
|
Feb 27, 2013, 10:59 AM | |
Sharing is caring: http://www.jazz2online.com/snippets/...mies-on-touch/
Very much room for improvement (never hurting the player when burning would be a good start)...
__________________
Mystic Legends http://www.mysticlegends.org/ The Price of Admission - Hoarfrost Hollow - Sacrosanct - other - stuff |
Feb 27, 2013, 11:13 AM | ||
Quote:
Would o.objType | 16 == 16 work there in place of the long list of eventIDs? Also IIRC you should specify the creator ID in jjAddObject as p.playerID, to ensure the right player gets points for destroying the enemy.
|
Feb 27, 2013, 11:21 AM | |||
Quote:
enemy.objType >= 16 .Quote:
__________________
Mystic Legends http://www.mysticlegends.org/ The Price of Admission - Hoarfrost Hollow - Sacrosanct - other - stuff |
Feb 27, 2013, 11:56 AM | |
...yes, that's what I meant. Maybe
(o.objType & 16) == 16 just to be safe, since I don't remember AngelScript's order of operator priority.
|
![]() |
«
Previous Thread
|
Next Thread
»
Thread Tools | |
|
|
All times are GMT -8. The time now is 07:29 AM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.