A downloadable Stencyl tutorial

Hi guys!!!

Today l'll help you with Stencyl's Invaders Game. We will fix some events or problems that you have.

Problem 1: Moving the ship.

If you had problem with this see the photo below:

1.1. Make an Attribute, name it Ship's Speed and set it as Number Block. Then go to Setters category, make an "When created" event, put the Attribute (in Setters block) and give it it's speed (like 25 or 50...)

1.2. Make an "When Updating" event.

1.3. After you made the event, grab these blocks.

Note: Don't forget to get the Attribute you made (as Setters block)

1.4. Then just group the blocks.

2. Keep the Ship on screen.

That's something that l don't know if you had problem but however use the photo to check:

2.1. Find the blocks.

Don't panic with the blocks, just find these blocks.

2.2. Group them.

2.3 And of course, select Ship to each Actor selection.

3. Killing the Enemies.

l think this problem is everybody's problem. 

- If my rules are mixing you up, copy everything from this photo except the second event; You will fix it by changing the Health Points 2 with Victory Counter.

3.1. Make 5 number attributes for adding the aliens' health.

3.2. Make 5 collucion events for each alien. After you made them, put the kill block and put the Actor of Type attribute (from the event)

  • When  [ Alien ] hits a [ bullet ] -  { 1st Actor } { Actor of Type }

After that, get an "apply effect to [ actor ]" block to set the actor to the Alien. Then, get an Do after N seconds block and put inside a "remove all effects from [ actor (the alien at this moment ) ] and get:

1. Set (the blocks you made) to: ... WARNING that if you use this block you have to get each Alien's attribute to collide with it's heatlth.

2. A "minus" block.

3. An getter of each Alien's health attribute.

3.3. Group the blocks. When you do it, write 1 inside the right place of the "minus" block.

3.4. You will do the same for other 4 times. Now we'll explain how the Alien will be killed if he has no health:

3.5 Make a Number event. After you made it change the attribute to Health Points change greater to less and set number to 1. Then put a "play sound" block and select Explosion. Last, put the kill the Alien.


3.6 Make a Killed event. Then put an "increment" number block and change it with Victory Counter (NOTE: l have made a mistake to the photo that l putted health points instead of Victory Counter. You will put Victory Counter not Health Points)

3.7 Make a When Updating event. After that, put a "if" block, then put inside the "boolean" hole a "equal" block. Inside of it put the Victory Counter attribute and write at the right place 5. Then, put inside the wrapper the setter of the "Win" attribute and put a "true" boolean inside of the attribute.

3.8. Finally, make an When drawing event and put inside of it a "set current font to [ font ]" and select the font that you made. Then get an "if" block and put inside the boolean hole the getter of the "Win" attribute. Last, put inside the wrapper an "draw [ text ] at [ x ] [ y ]" write You win!!! and set the position you wanna draw it.

By Chris24XD (the explanation)