CIS 487/587 Bruce R. Maxim UM-Dearborn

Slides:



Advertisements
Similar presentations
Using Microsoft PowerPoint in the Classroom
Advertisements

Vocabulary Interactive
Main Menu SquaredCrazy Mouse Quit Important: Use the Quit button located on the top right of this slide to exit the presentation! Why? Created by Ethan.
Registering Students for All-State Auditions Using MPA Online.
Skater World: Part One By Deborah Nelson Duke University Under the direction of Professor Susan Rodger May 29,
LMMS is a digital audio workstation that allows you to produce instrumental songs. LMMS stands for Linux MultiMedia Studio. The software was originally.
Microsoft Word 2010 Lesson 1: Introduction to Word.
5/24/20151 Torque Constructor CIS 487/587 Bruce R. Maxim UM-Dearborn.
1 Exploring Stagecast Creator Stagecast Creator Tutorial: Kids Smoking on the Playground By: Community Simulations Team Center for Human-Computer Interaction.
Methods Tutorial: Part One By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 9, 2008.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
Jump to first page 10/2/2015 Learning PowerPoint A Tutorial Start.
1. CLICK “CONTACTS” (BOTTOM LEFT CORNER OF SCREEN) 2. SELECT “NEW CONTACT GROUP”
Windows Tutorial Common Objects ACOS: 1, 4. Using the Taskbar 1. Using the taskbar, you can switch between open programs and between open documents within.
By Deborah Nelson Duke University Professor Susan Rodger July 13, 2008.
Ms. Laura Gottardo Grand Canyon University TEC 551 6/28/11.
Introduction to Using the Notebook 10 Software for SMART Board Day 2 LIVINGSTON PARISH PUBLIC SCHOOLS Facilitated by S. Waltman.
Lists Tutorial By Deborah Nelson Duke University Professor Susan Rodger July 13, 2008.
Learning How to Make a PowerPoint Presentation A tutorial for novice users.
Processing Lab 2 – Geometry Bryce Hutchinson Objectives: Add a dictionary Gain a better understanding of header issues Display geometry correctly Visualize.
Recording Your Script 1)Find a quiet place to record. 2)Open up your phone’s recording app. 3)When recording, remember: Speak very clearly Enunciate Do.
The Essentials of Alice (Bunny) By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008.
The Essentials of Alice Mrs. Jayne Slease SBMS CTE Computer Science and Animation Credit to Duke Students under the direction of Professor Susan Rodger.
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
Sega 500 Scripted events and Sequences Jeff “Ezeikeil” Giles
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Photoshop Actions Lights, Camera, Actions in Photoshop.
The Essentials of Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University May 2009.
Recording Your Script and Creating Your Podcast !!You are not finished until you have completed all steps on all of the slides up to and including Slide.
Getting Started With Alice: The Basics. Step 1: Background Open up Alice, and choose a background for your Alice world. Your world is something you can.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
ACCELLER WIKI TRAINING Share your knowledge with others.
Learning PowerPoint A Tutorial.
Professor Susan Rodger
App2Talk Tutorial App2Talk Tutorial.
Steps to Build Frame Window Recipe Application
An Introduction to Alice (Short Version)
Teaching Characters to Walk: Learning Methods, Part 1
Recording Your Script and Creating Your Podcast
Presenting Prezi Michael Pelitera
Making Objects Move in Unison: Using Lists
Tutorial for using Case It for qPCR analyses
Assignment 8 Chess Game.
Operating Microcomputer
MS PowerPoint 2010 Week 2.
Learning to program with Logo
Chapter 7 Advanced Form Techniques
Debugging with Eclipse
PowerPoint Manual A guide to using PowerPoint to make your own “Jeopardy” Game from a prepared game template. Created by: Teri Bohr for: ETC 567.
Making Objects Move in Unison: Using Lists
CIS 487/587 Bruce R. Maxim UM-Dearborn
LMS Images.
CIS 487/587 Bruce R. Maxim UM-Dearborn
CIS 488/588 Bruce R. Maxim UM-Dearborn
Making Objects Move in Unison: Using Lists
Introduction to PowerPoint
CIS 487/587 Bruce R. Maxim UM-Dearborn
LMS Images.
CIS 487/587 Bruce R. Maxim UM-Dearborn
Professor Susan Rodger
Introduction to PowerPoint
Recording Your Script and Creating Your Podcast
Professor Susan Rodger
LMS Images.
Running a Java Program using Blue Jay.
Making Objects Move in Unison: Using Lists
Steps to Build Frame Window Recipe Application
CIS 488/588 Bruce R. Maxim UM-Dearborn
Debugging with Eclipse
Presentation transcript:

CIS 487/587 Bruce R. Maxim UM-Dearborn Torque Bots and Damage CIS 487/587 Bruce R. Maxim UM-Dearborn 11/29/2018

Slides based on the Code Sampler Tutorials by Kevin Harris 11/29/2018

Adding a Bot - 1 The code found in the bot.cs script file was taken from a more complicated A.I. script called, aiPlayer.cs, which is part of the starter.fps example. Copy the bot.cs script to your tutorial.base/server directory. Open the game.cs script file located in the tutorial.base/server directory 11/29/2018

Adding a Bot - 2 Add the following line of script to the function onServerCreated( ) add it to the end of the list like usual exec("./bot.cs"); Besides defining how our bot follows a given path, the bot.cs script also defines a special object called AIManager which is responsible for managing all bots in general For our AIManager to work, we'll need to add some code to start and stop it respectively. 11/29/2018

Adding a Bot - 3 Add the highlighted lines to the onMissionLoaded() function: new ScriptObject(AIManager) {}; MissionCleanup.add(AIManager); AIManager.think(); Next, we need add a of line of code to the onMissionEnded() function to delete the manager object when our game is done.     AIManager.delete(); 11/29/2018

Adding a Bot - 4 When done, close and save the "game.cs" script file. Note: We haven't laid-out our path yet with the Mission Editor so the function AIManager::spawn( ), which actually spawns the bot, will simply spawn a regular bot without specifying a path to follow. 11/29/2018

Path Definition - 1 Run the test application by double-clicking torqueDemo.exe, which is located in the example directory. When the main menu comes up, click the "Load Mission!" button. A mission named, "F World", should load. After the mission starts, move forward a bit and turn around. You should see a motionless bot just standing there. 11/29/2018

Path Definition - 2 Find a relatively flat area where it will be easier to create a path and hit F11 to open the Mission Editor and switch to "World Editor Creator" mode. Expand the tree in the lower right half of the screen by clicking the "Mission Objects" entry. Expand it out like so: "Mission Objects->Mission" 11/29/2018

Path Definition - 3 In the Mission directory, you should see several entries to choose from. Click the entry labeled "Path" just once to create a new Path object. Name the Path object, "myPath". In the MissionGroup tree, which is in the upper right hand side of the editor, expand out the tree and find the node labeled "myPath". 11/29/2018

Path Definition - 4 Make this node the current selection by holding down the "Alt" key while clicking it with the mouse. If done correctly, the selection color of the "myPath" entry should change from white to gray. Make sure the path markers get grouped under our new Path object. 11/29/2018

Path Definition - 5 Return to the tree control in the lower right hand corner and click the “PathMarker” in the "Mission" directory. Name the new PathMarker, "myMarker0" and check to make sure it was correctly grouped under "myPath" in the "MissionGroup" tree control. Repeat the process to create two more PathMarkers called, "myMarker1, and "myMarker2". 11/29/2018

Path Definition - 6 Make sure to place the markers far enough apart so you can see your bot run around. Save the mission file by selecting and exit completely out of the game. return to the bot.cs script file located in the tutorial.base/server directory and edit the function AIManager::spawn() Comment out the line of code that creates "Bot_1" and uncomment the code below it that creates "Bot_2“ and save bot.cs. 11/29/2018

Test Bot Run the test application again by double-clicking torqueDemo.exe. If everything was done correctly, you should see a new bot called "Bot_2" running around your new Path object's PathMarkers. If not, make sure that your PathMarkers are not too low on the terrain and that they're correctly grouped under the "myPath" object. 11/29/2018

Weapons Damage This tutorial demonstrates how to apply weapons damage to both players and bots when a weapon's projectile collides with them and how to calculate "radius damage", which allows an exploding projectile to damage a player without making direct contact. This tutorial not only requires the Tutorial Base application as its starting place, but also requires the addition of the Weapons and Bot Path-Finding tutorials. 11/29/2018

Damage - 1 Copy the scripts radiusDamage.cs and shapeBase.cs to your tutorial.base/server directory. Open the game.cs script file located in the tutorial.base/server directory and add the following script lines to the function onServerCreated() exec("./radiusDamage.cs"); exec("./shapeBase.cs"); 11/29/2018

Damage - 2 Copy the player_dieknees.dsq animation file to the /tutorial.base\data\shapes\player directory. Open the player.cs script file located in the \tutorial.base\data\shapes\player directory and following highlighted line of script to the datablock TSShapeConstructor sequence12 = "./player_dieknees.dsq die"; 11/29/2018

Damage - 3 This is the last change to this player.cs save the file and close it. Open the player.cs script file located in the tutorial.base/server directory and add the following line of script to the datablock PlayerShape     className = Armor; 11/29/2018

Damage - 4 Add this function to the bottom of the player.cs script. function Player::playDeathAnimation( %this ) {   %this.setActionThread( "die" ); } Add this function next. function Armor::damage (%this, %obj, %sourceObject, %position,       %damage, %damageType ) {     … } 11/29/2018

Damage - 5 Add this function next. function Armor::onDisabled( %this, %obj, %state ) {     … } This is the last change to this player.cs save the file and close it. Open the rocket_launcher.cs script file located in the tutorial.base/server directory 11/29/2018

Damage - 6 Modify the datablock RocketProjectile datablock like so: directDamage = 50; radiusDamage = 25; damageRadius = 1.5; Then modify the function RocketProjectile::onCollision function RocketProjectile::onCollision ( %this, %obj, %col, %fade, %pos, %normal ) { …    } 11/29/2018

Damage - 7 That's it for rocket_launcher.cs save the file and close it. Run the test application by double-clicking torqueDemo.exe You should now be able to shoot and kill the path-finding bot as well as blow your self up by shooting at your player's feet. 11/29/2018