71,666

Views

Beginner

Level

58

Comments

Abigayl's Interactive Tutorials (Part 2)

by Joe (Updated on 2012-07-21)


Tutorial 2 - Attributes, Saving/Loading, Kongregate API

 

CHANGES TO CURRENT STENCYL VERSION:

  • Game Center is now Dashboard
  • No longer need to make Actor Behaviors; can use "Events" tab instead
  • Now need to use "Add an Event" at the top left to make the headings
  • If using events, do not need to "Attach to Actor" (still needed with Behaviors though)

 

Liked this one? See them all!

Part 1: The Basics

Part 2: Attributes, Saving/Loading, Kongregate API

Part 3: Advanced Controls, Spawning

Part 4: Mouse-based Shooting, Collisions and HP

Part 5: Music, Screen Boundaries, Backgrounds, Power-ups and More

Part 6: Virtually Lagless Actors

Disclaimer: Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!

58 Comments

MADInc
OMG I love you Abigayl thanks alot:)
0 14 years, 3 months ago
Abigayl
np, glad to help :)
0 14 years, 3 months ago
Ant134
Thanks, I will keep that in mind and thank you for the reply. Great tutorial by the way!
0 14 years, 3 months ago
Abigayl
Ant, that is an issue with the screen boundaries. While making the tutorials, I was searching for the best way to handle the boundaries but never found a "best" solution, so I included two different methods in tutorial 5.

BTW, if you want a quicker response, please feel free to send me a PM since those come directly to me instead of having to check the page.

0 14 years, 3 months ago
Ant134
Abigayl, on your version of the game (the one playable in the browser) when the player's character leaves the screen the game restarts and it counts as if he/she died because the high score is updated. However, in my version when the player's character goes off the screen it just disappears and I cannot get the actor back on the scene no matter what I do. The score continues to rise and the enemies continue to spawn. Have I missed something from one of the two tutorials or have you added a little piece of code to yours? I'm very sorry if you have already had to answer this question. Thanks.
0 14 years, 3 months ago
Abigayl
2b is correct. When testing with Kongregate coding already in your program, you will need to deactivate the codes (right-click and select activate/deactivate), both the initializer and the submission in order for the game to work properly. When you put it on Kongregate then, just re-activate the codes (same way).
0 14 years, 3 months ago
2b3o4o
Actually, the problem was, since you were testing the game offline, the game couldn't connect using the Konngregate API. Apparently this causes problems...
0 14 years, 3 months ago
Ugatuga
never mind I fiddled with it i put the score uploader inside the save instead of next to it and that seemed to solve the problem.

0 14 years, 3 months ago
Ugatuga
Ok I actually had it working working just fine. Then I added the score and highscore tests I tried it out again and the collision works but doesnt restart the scene it only pushes the enemies around.
0 14 years, 3 months ago
Abigayl
Joa, it checks to see if the player hit an enemy. If the player did, then check the score to see if it is a new high score (and set the high score if it was). Then, save the game and submit the score to Kongregate. Finally, it resets the game.
0 14 years, 4 months ago

Sign In to Comment