The 2DIY script archive

A resource containing Actionscript examples for 2Simples 2DIY software.

  • ActionScript
  • Animation Script
  • Collision Script
  • Start Button Script
  • Examples
  • Ideas
  • Help/Videos
  • Discuss

Changing the speed a character travels across the screen

When editing an activity that includes collecting objects, (or avoiding objects), you can alter the speed a character moves to the left and right.

Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.dx=4;

The smaller the value, the slower the character will move. This can be handy if you are creating an activity in a water setting, where movements will be slower.

View example; Download Start_button_dx

Posted by Xannov in Start Button Actionscript | Permalink

Reblog (0) | | Digg This | Save to del.icio.us |

Changing the height a character can jump

When editing a platform activity you can alter the maximum height at which a character can jump up to. Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.jumpSpeed=-16;

The smaller the value, the smaller the height the character will jump on the screen. It can be used to create more difficulty in an activity, by limiting the route a character can travel along.

Note: the value is always negative

View example; Download Start_button_jumpSpeed

Posted by Xannov in Start Button Actionscript | Permalink

Reblog (0) | | Digg This | Save to del.icio.us |

Changing the speed a character falls

When editing a platform activity you can alter the speed at which a character falls down the screen.
Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.maxFallingSpeed=16;

The smaller the value, the slower the character will drop down the screen. It can be used to create a "parachute" effect.

View example; Download Start_button_FallingSpeed

Posted by Xannov in Start Button Actionscript | Permalink

Reblog (0) | | Digg This | Save to del.icio.us |

Changing the closeness of collisions with objects

When editing an activity that includes collecting objects, (or avoiding objects), you can alter the sensitivity of the collision detector.


Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.hitDist=40;

The smaller the value, the closer two objects must be before they interact with each other. 
Note however that if you set the value to "0", you will not be able to collect any items.

View example; Download Start_button_hitDist

Posted by Xannov in Start Button Actionscript | Permalink

Reblog (0) | | Digg This | Save to del.icio.us |

Search

Recent Posts

  • 2DIY with Gifted and Talented groups
  • Making characters fly (and other effects)
  • High Lawn Primary Games
  • Creative Learning
  • Gallons of Games
  • Games Pod Creations
  • Kensington Avenue Primary 'Games Pod'
  • Actionscript Tutorial No.8
  • ActionScript Tutorial No.7
  • ActionScript Tutorial No.6

Recent Comments

  • Xannov on Discuss
  • Angela Canas on Discuss
  • Xannov on Discuss
  • Angela Canas on Discuss
  • Xannov on Discuss
  • Ali on Discuss
  • Xannov on Discuss
  • Max Wainewright on Discuss

Archives

  • June 2011
  • May 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010

More...

2Simple Talk

login
Follow @xannov

| The 2DIY script archive |

Design by @xannov