Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All of the functionality for moving your character, sending bombs, and positional/state information of the belts and bombs have been written for you inside other

image text in transcribed
All of the functionality for moving your character, sending bombs, and positional/state information of the belts and bombs have been written for you inside other scripts. You can access those functions by using the mainScript variable that is already declared and initialized for you inside of the AI Template.cs file. Below is a complete list of functions. void moveUp void moveDown () void push o Moves the player up. The player will continue to move up until otherwise instracted Moves the player down. The player will continue to move down until otherwise instructed Attempts to push the closest buttion. If the character is too far from the button, the button is already engaged, or is on cooldown, nothing will happen. float getcharacterLocation O Returns the z position of the character as a float float getopponentlocation) Returns the z position of the opposing character as a float floatgetButtonLocations () Returns an array of floats (z position) for representing the position of each button on your side floatl getButtonCool downs O Returns an array of floats representing the time remaining before each button may be pressed again. bool [I getBeltDirection Retuns an array of Boolean values that corresponds to whether or not the buttons on your side of the board have been engaged True means the belt/button is engaged and the bomb is moving towards your opponent floatl getBombDistances Retuns an array of float values (x position) that represent the float getPlayerSpeed float getBombSpeeds ( distance cach bomb is from its corresponding button on your side Returns the speed at which the characters move Returns an array corresponding to the speed at which each bomb is currently moving. Make sure that you've changed the name of the script to AIScript YourName.cs and that you've also changed the class name to match the file name. Upload your completed Al script to Canvas. Whenever a button is pressed, that belt becomes disabled for 1.0 second. Neither player may press second has elapsed. Example: the blue player presses the button on belt 1. Both the blue player's button 1 and the red player's button 1 become disabled for 1.0 second. a button on that belt until the You can access the list of each bomb's current cooldown by calling getButtonCooldowns ) Calling moveUp ) at the very top will have no effect. This is likewise true for moveDown () at the bottom. Make sure your script has elements of AI. Simply copying what the opponent is doing (i.e., following) or doing the same time every time regardless of what environmental percepts dictate is not Al

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago