Wednesday, 20 April 2016

Year 3: Game update: Tower selection

Tower/Unit selection

Tower selection 
The tower/unit selection mechanic was implemented to give the player more information about objects in the game. the way that activated in by the player clicking on round plates the tower is on and then will relay information to the user interface given the illusion that the player is select in the tower and get the information. When the player selects the power straight off a small menu will pop up on the left-hand side of the screen showing a small amounts of information about the tower such as its name, health, tear and tower type. There is also button on the bottom of the screen that the players see a full tower description User interface.


The tower description UI (User interface) is where the player can see all the information about a tower. This is meant to be an in depth look into what a tower properties are that the player can be clear  to what the tower does. the menu settle with the sell tower but below an image which is meant to display a visual image of the tower the then four tabs located upon the bottom of the panel this will play can access the four different types of information about the tower.

The first tab called " Basic tab" shows the basic information about the tower such as Tower name, current health, currents to your level, tower type, whether the power produces resources or not and as well as how much the tower collectors per second for each resource then also list whether the tower has, type, the damage resistance of the tower and then finally how much resource the player will get back when they sell the tower.


The Second Tab is the combat tab this is where all the combat information for the tower is. Its displays the combat types the tower is, the damage per hit the tower dose, the rate of fire per second, the range of the tower, the damage that the tower and finally the combat description which gives a short descriptive text  on how the tower behaves in combat.


The third tab is the buff tab this is where Information about difference buffs the tower or is giving out. this at the faults is empty and the interface only changes upon its receiving of a Buff or Shields from other towers.

 

When the tower is getting a buff from another tower the default menu layout will change and allow the players to click a button and see the full description of the boss at our house. On entering this new interface it will show what properties with Tara currently being both. This consists of buffing the Tower health, multiplying attack speed, increasing damages to, multiplying range and also health regeneration


When the tower is getting a shield from another tower similar to the option that happened when the towers assuming a buffs the interface will change. This then allows the player to see the properties of the shields the tower currently has. these properties include things such as the total shield health the recharge rate per second and also how long in seconds it takes before the shield can be charge.


The final tab is where the players can see what type of Mutations a tower has on it. As well as get a full description on what these mutations do to the tower


Looking deep into the blueprint side of the selection mechanic that start first on the object "RTS cam" we first take the events of  left mouse button press then go straight to a branch to check if the camera is and build mode if false with and also check out with another branch if a nor the tower/unit selected and if false with and allow a line traced by Channel nodes to be used this finds the camera's world location as starting points then gets the player controller uses our get hit result of the case by Channel nodes breaks that results and gives us the location to use as the endpoint. This draws straight from the camera to anywhere on the map the player is clicked.once the large races completed we use abranch to check whether  an object was hit if truewe break the hit results and find the hit actor then set this to a variable called "left mouse hit object" we then use a sequence and three separate custom macro nodes which responds to a ground plate and the two separate AI and this is the basis of the tower selection process.


This is inside the "Tower send info" custom macro node the macro start by taking a pulse events as well as a hit actor object which is used from the lime trees by Channel load in previous blueprints are there. We don't start by casting to ground plates this then eliminates errors as the only object that can pass through the snow now our ground plates. Upon  the successful cast the ground plates it is an split three ways by sequence.  From the first event of the sequence we go straight into a branch which checks the ground plates for a BOOL variable " plate used real" if true we then proceed through the branch we then use a spawn at the node this is where we spawn the Tower selection box which gives the illusion  that the tower is selected showing a blue capsule around the tower. we then use the location of the less mouths hit objects to spawn this "tower selection box" after the completion  of this node we then splits the offence take again with a sequence  going to separate ways. First we use a node called  add actor local offset which then takes in the variable from the spawn actor known and adjusts the newly spawned Tower selection box slightly so that it is in the proper position we then also set the variable " tower/unit is selected" too true we then also change a variable on the user interface called "tower info panel visible" and set this to visible we then follow the line out of the macro. With the second line of the sequence that we set the variable coming out from the spawn act their node called "return value" we then set this to a variable called Tower selection box so that it can be used later easily. 

back to the main sequence at the beginning of the blueprints the second line changes a variable on the user interface called " on spawn description  hide objects" and this is set to visible

the third and final test of the main sequence finds of variable on the ground plates called " Tower on plates"  and sets this to the RTS camera as they know the variable called " Tao on ground plates" so can be pulled up later for ease of use. carrying on from the command line we then send an event to the " tower on brown plate" called Tower info this also sends a reference to the RTS camera and user interface so that the tower has these variables saved and can recall them use in future code lines. within also send another events to the tower on ground plate called the tower is selected.


The next stab of the tower selection process goes straight to the tower itself. as in the previous that we triggered an event called " Tower info" we now see the results of this with stray off the events going into a three-way sequence it then sets to variables with the sequence both the RTS camera and the user interface provided for its by the events from the ground plate. This is sure that they can be referred to easily in the future lifespan of the blueprints.


The third sequence  pulse triggers an event called " Tower information for user interface when selected" this sends the first basic step of information to the user interface when Tara selected such as the health, tear number and what type of tower. after this the event is then split up into a sequence again goes into a custom macro node called "Tower description send information" this then send all the information for the full Tower description straight to the user interface to be set so that I can be the  displayed to the player easily. after this node if applicable we then send the current boss this tower is receiving to the user interface where it is then goes through a section of gates were if it retains a zero it is not displayed through the interface.the second line the sequel to check to see if the tower has a mutation and if true than sends an event is the user interface changing the descriptive text to fit with the current mutation at our house.



Unit Selection
The unit selection process is not as advanced as the tower such processes as there is not as much key information that needs to be relayed to the player about the AI.


The selection works in a similar way that wants the player clicks on the AI a selection box similar to that that spawned through a tower is spawned as well as relaying information about the units to the player such as health, tear and unit type as well as the damage this unit does.

Going back to the RTS camera we then delve into two different macros that have been created after the lime tree is drawn from the camera to select a unit/style. the first macro is called "AI Conqueror send info" it takes in an event pulse as well as a object reference then goes straight into a cast to "conquer a AI character beginner" if the cast are successful then saves this variable to AI Congress selected variable then sends and events to said variable called "selected by camera" this simply unhides  with our selection box to give the appearance I hit it has become selected.


It next changes the variable "tower/unit is selected" to true then it sets the variable on the user interface called "unit information panel visibility" then set to visible.once this is all complete with and send the final event to the user interface getting all the property variables about the unit such as unit name, unit health, unit tier, unit type and unit damage. this then means that  these variables can be displayed on the user interface when selected. 


The next macro called "AI warlords send info" with exactly the same as the or the macro called "AI Congress send info" all that is changed is that the cast at the beginning of the blueprint script is changed to a warlord AI character beginner but all the code with exactly the same.





No comments:

Post a Comment