00:00
00:00
lajbel
Web games developer, working on games and game engines for the web.

Danie ☕ @lajbel

Age 18, Male

Developer

Argentina

Joined on 4/21/21

Level:
14
Exp Points:
1,950 / 2,180
Exp Rank:
32,596
Vote Power:
5.58 votes
Rank:
Town Watch
Global Rank:
45,295
Blams:
23
Saves:
172
B/P Bonus:
2%
Whistle:
Normal
Trophies:
5
Medals:
633
Supporter:
2m

Scratch + Newgrounds.io

Posted by lajbel - September 8th, 2021


ohhi scratch developer, this is a remake of the original tutorial of how to use scratch with newgrounds.io


Main functions 📦

here we will see the main functions that we all want to use, such as medals and scoreboards


Step 1: Eval Variable

add a ☁️cloud variable with the name "eval"


iu_739452_9008270.png

this is to run javascript and use the newgrounds.io functions! 😺😺


Step 2: Connect()

now we will connect our game with Newgrounds.io before using any thing, you must put it in a 🚩FLAG event, to avoid errors


iu_739453_9008270.png

(replace the first value with your App ID and the second value with you encryptation code, you can find it in Api Tools of your project)


ready! now we can use the newgrounds.io functions!


Step 3: Newgrounds.io functions

we will quickly look at an example for each function


Get Medal

iu_739451_9008270.png

(replace the number by your Medal ID, you can find it in API Tools)


Post Score

iu_739454_9008270.png

(replace the first value with your ScoreBoard ID, you can find it in API Tools, replace the second value with the score to give)


Post Score with Variable:

iu_739455_9008270.png


Step 4: Package your game (IMPORTANT) 📦

now that you have used the api as you want, we need to compile it using a packager/compiler.


Using HTMLiefer

if you want use HTMLiefer compiler, you need use this template. Now put your project id and choose the options that you like, then press HTMLify!, this download a zip and you must upload it to your newgrounds project 🐸


Using TurboWarp

if you want use TurboWrap Packager, you need install this template, unzip and load it with import settings here. Now put your project id and choose the options that you like, then press Package, this download a zip and you must upload it to your newgrounds project 🐝


Cloud Save ☁️

cloud saves are great, and they are very easy to use.


Step 1: Eval Output Variable

add a ☁️cloud variable with the name "eval output"


iu_739456_9008270.png

the purpose of using this variable is to receive the content that eval can return, in this case, the value of the cloud saves


Step 2: Set a Cloud save


iu_739458_9008270.png

(yes, it's easy)


Step 3: Get a cloud save

we must add a wait because for some reason the variable is not updated at the time the other variable is updated, a small wait will fix the problem.


iu_739457_9008270.png


that's it, you can now use the wonderful cloud variables in scratch. By the way, with eval output you can also use GetUsername() and GetVersion() 🦋🦋


No work ☹️

yes, it can happen that it does not work, it is normal, we are all human. I can help you, first I need you to check that you have done all the steps to the letter. If this does not solve your problem, I would appreciate it if you could change your Connect to this one (remplacing by your values)


Connect("55143:RrL4bDjH", "6kB/g/l9dLIdHFXLn4T69g==", { debug: true })


now, press f12 or ctrl shift c in your browser while testing your game, some messages will appear. Show them to me so I know how to help you! You can do it here or in pm 🦜🦜


Thanks 💌

i would like to thank all the people who have helped with support and so on, and all the scratch developers who have shown their appreciation and support for this ❣️


@s-zenmode

@Dungeonation

@JimmyCarlos


I also appreciate people who send me invitations to their projects using ng.io, just make sure you invite me as a beta tester, as I don't want to take credit for your excellent project. Thanks 💌


Bonus Links 🐝

Putting your Scratch Game in Newgrounds tutorial by midgetsausage

Real Game

Original post

Collection with some Scratch Games using Newgrounds.io API


Tags:

25

Comments

I tried it with SteakClock in the Desert, but it won't load completely. Stuck at 100%

You use Unknown/Private mode?

@Anonymous-Frog @LaJBel what's that?

Incongnito mode?

@Anonymous-Frog @LaJBel @LaJBel Yes I use it. It usually works fine for medals.

Yeah but in Scratch none, for the options of the compiler

Godspeed <3

HUWIUHEQWHEIOUQWEHIUQWIHUERIHU2RIUHWERIHUWUFHFUHIUFIHWEHRUIWEHUR
---------
OH. MY. GOD. AMAZING!!!!!!!

Thank you so much

Followed

How much of the AppID and encyption code do I enter? The whole thing?
69420 or 69420:4hr5ITo2

All appid, and all enc code

And do I put them in brackets?

yeah

@Anonymous-Frog @LaJBel @LaJBel Could you fix this incognito issue?

THANK YOU

Thank you for making this, this will be very helpful for my Scratch game.

never use eval!

im made the medals in the gmae bit it will not appear for some reason

@BogivMusic why not?

Do you intend on adding other newgrounds.io features or are the other stuffs already implemented? Like the get version features those stuff

@0mgRod upload to newgrounds, preview, make sure you did everything correctly. did you turn on special cloud variables? did you paste the custom js link?

@s-zenmode It works now. Someone helped me before you commented.

is this working for the newgrounds ads? and how can i do it?

nop, that's a feature of the flash api, you could try using Scratch 2 but idk

By any chance does this work with turbowarp html? (turbowarp is a modification of Scratch 3.0)

Does this work with turbowarp? We are trying to add medals to our game goBuild Legacy

No, this doens't work with tw

More Results