The 2DIY Script Archive

A resource of Actionscript examples for 2Simple's 2DIY software

  • Home
  • 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 in Start Button Actionscript | Permalink

Reblog (0) | | | | Pin It! |

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 in Start Button Actionscript | Permalink

Reblog (0) | | | | Pin It! |

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 in Start Button Actionscript | Permalink

Reblog (0) | | | | Pin It! |

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 in Start Button Actionscript | Permalink

Reblog (0) | | | | Pin It! |

Recent Posts

  • Coding with 2DIY - a 6 week unit of lessons
  • 2DIY and the New Computing Curriculum
  • 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

Categories

  • 2DIY Examples
  • Actionscript Code Names
  • Animation Actionscript
  • Collision Actionscript
  • General
  • Lesson Plans & Ideas
  • Start Button Actionscript
  • Tutorials
See More

Search

| The 2DIY script archive |

Maintained by the Digital Learning Coordinator, Porchester Junior School, Nottingham.

The actionscript codes that are used within this archive were provided by
Max Waineright and Dan Ziskind and reproduced with their permission.