Platformer Shooting Script
Modified Dodgeball script, allows player to shoot left and right. Note: projectile has a ghost collider and phases through walls. Use with Destroy Player Projectile Script.
platformer_shooting.txt | |
File Size: | 1 kb |
File Type: | txt |
Destroy Player Projectile Script
Script destroys projectile off screen.
destroy_player_projectile.txt | |
File Size: | 0 kb |
File Type: | txt |
Player Controller with Slash
Player controller script works with Swept Controller, includes capabilities of slashing animation that could be modified to include crouching state. This also includes capability for shooting a projectile left and right.
playercontroller_with_slash.txt | |
File Size: | 3 kb |
File Type: | txt |
Player Controller with Wall Jump and Double Jump
Controls player movement and has double jump, and wall jump. Includes properties for velocity of jump, horizontally with WallJumpLeft and WallJumpRight, and jump height with WallJumpHeight. Ensure that WallJumpLeft is a negative value to jump in the correct direction.
player_controller_with_wall_and_double_jump.txt | |
File Size: | 3 kb |
File Type: | txt |
Basic Enemy Movement
This script moves an enemy back and forth between two points. Use the properties leaftboundary and rightboundary to set the limits of the movement. Attach this as a property to the enemy object. Notepad file.
basic_enemy_movement.txt | |
File Size: | 1 kb |
File Type: | txt |
Enemy Movement with Ai
This script moves an enemy back and forth between two points, once the player object enters the region that it moves in, it moves towards the player. Once the player moves outside of the movement area, it resumes its' original movement back and forth. Zilch file.
enemyai.z | |
File Size: | 3 kb |
File Type: | z |
Advanced enemy Ai
Script paces enemy back and forth, when an enemy gets within range, then it moves towards the player and stops then shoots. Uses animations, object stops and turns static so it can't be moved until player moves further away.
advanced_enemy_ai.txt | |
File Size: | 9 kb |
File Type: | txt |
Projectile used by Advanced enemy Ai
This script is used by the Advanced Enemy Ai script
projectile.txt | |
File Size: | 0 kb |
File Type: | txt |
Load Level on Contact
This script will load a new level when the player collides with an object (like a portal). The script is a component of the portal, you will need to change the script to ensure that your player's name is the name that it is looking for on collision. This script includes provisions for carrying over data like player health from one level to another.
level_load_on_contact.txt | |
File Size: | 1 kb |
File Type: | txt |
Load Level After Time
This script loads a new level after a set amount of time. This is helpful for in between scenes transitioning between levels. This also has provisions for transferring data as in the script above. This script is a component of either level settings for that level, or another object that is persistent in that level window, like the text object "Next level loading now".
load_level_after_set_time.txt | |
File Size: | 1 kb |
File Type: | txt |
Button Script (default to change level)
Simplified Button script. This is set up to change to a different level on button click. Button changes on hover and click state. You can modify to make the button initialize other types of actions in the clickedState function.
button.txt | |
File Size: | 3 kb |
File Type: | txt |
Player HUD
Script is attached to level settings object to display score. Can be edited to include health, points, lives etc.
playerhealthhud.txt | |
File Size: | 1 kb |
File Type: | txt |
Confirmation Pop Up Script
This script is used as the last step of the User Interface Tutorial on the Digipen site. It has been saved here for your convenience as there are parts missing in the tutorial.
confirmation_pop_up_script_for_ui_tutorial.txt | |
File Size: | 4 kb |
File Type: | txt |
Expanding Camera
This script links the camera to two player objects, and then will expand and contract its size based on the distance between the characters. Originally designed for a fighting game, but useful for top down arcade and platformers as well. Not very useful for puzzle games as players can expand the camera to see the entire maze.
expandingcamera.txt | |
File Size: | 2 kb |
File Type: | txt |
Example Project with Moving Platforms and Ladder
This project utilizes an older build but has platforms that move side to side and up and down. The player character is programmed to move with the platforms, and can also climb and descend ladder objects. The important scripts are:
For the platforms:
PlatformVertical
PlatformHorizontal
MoveColliderHorizontal
MoveColliderVertical
PlayerController
For the Ladder:
Ladder
SweptController (Lines 313 to 320 added by Mr. Kramer)
PlayerController
Platforms need to be named PlatformHorizontal or PlatformVertical, they must have a boxcollider, they need a child collider object (named PlatformCollider that is slightly larger (.1) in the Y axis than the platform, and have a collider that is Ghost. This collider object also needs either the MoveColliderHorizontal or vertical script attached to apply movement to the player object. You must use the included player controller to have the player move with the platforms.
The ladder object is an invisible sprite with a boxcollider that is ghost. It must have the Ladder script on it, the player must have the PlayerController script and the updated SweptController script as explained above. When the player is in contact with the collider, using the up and down arrows will cause the character to climb up or down, and deactivates the jump.
For the platforms:
PlatformVertical
PlatformHorizontal
MoveColliderHorizontal
MoveColliderVertical
PlayerController
For the Ladder:
Ladder
SweptController (Lines 313 to 320 added by Mr. Kramer)
PlayerController
Platforms need to be named PlatformHorizontal or PlatformVertical, they must have a boxcollider, they need a child collider object (named PlatformCollider that is slightly larger (.1) in the Y axis than the platform, and have a collider that is Ghost. This collider object also needs either the MoveColliderHorizontal or vertical script attached to apply movement to the player object. You must use the included player controller to have the player move with the platforms.
The ladder object is an invisible sprite with a boxcollider that is ghost. It must have the Ladder script on it, the player must have the PlayerController script and the updated SweptController script as explained above. When the player is in contact with the collider, using the up and down arrows will cause the character to climb up or down, and deactivates the jump.
sweptcontroller2018.zip | |
File Size: | 544 kb |
File Type: | zip |