Wednesday, April 29, 2015

ET17 ASSIGNMENT 08

the cannon turret
video link http://youtu.be/aWJFz2RVPIo







turret in an area where they are going to be tight security


Wednesday, April 8, 2015

ET17 ASSIGNMENT 06 Adding Basic Interactivity

opening door system
and
elevator
the blue print for the elvator


 blueprint for opening doors
in game screen shoot of working elevator
video



ET17 ASSIGNMENT 04 UNREAL TUTORIAL: unfinished (pitures coming soon)

creating an simple inventory systemInventory hotbar syetem
open unreal a make a third person template
you will start by creating a new folder into the content browser and label it whatever you want.

Then created a new blueprint class under all classes type HUD and select HUD
name  it BP_hud



-------------------------------------------------------------------------------------------
setting screen dimension
Now create a new function call scale to ratio and open it
 Under this tab we are going to set the screen dimension to set up the hot bar to be in the hud.
Click on the scale to Raito and it should be highlighted and under the detasil tab in the right side. In the inputs and out out we are going to create 3 outputs and inputs. In the input we are going to create input_x, input_y, and scale. Then in the outputs output_x, output_y, and out_scale. They are all going to float.
Create variable call screen_dimension and it will be a vector2d
Now from the scale to ratio exec to set screen dimesion the from screen dimeson exec to sequence
From set screen dimension on the left side drag off to make vector 2d
Now get player controller and from the return value get viewport size from thew size x and size y connect to the make vectore2d to x to x and then y to y
Now create two variable ratio x and ratio y and both are going to be float
From sequence exec from then to set raito x and exec then1 to ratio y
Then get screen dimesion and exec to break vector 2d from x exec to divide float / float and connect to set ratio x. then from break vector2 y exec divide float / float and connect to set raito y
Not for the divide float / float for x is 1920 and the divid float/ float for y is going to 1080. You can chage these number if you want, but this is going the resolution you going to displaying at when play the game
From sequence addpin from then2 connect to returnnode
From scale to ratio from input x exec to multiply float /float and connect to the output x to the returnNode and get ratio x and connect to the multiply float/ float. And then do the ssame thing for input y and connect to output y and get ratio get and connect to multiply float/ float for y. for scale exec to multiply float/ float and connect to out scale. For this you use the get ration y from y and connect to the multiply float /float for scale

Then you done for screen dimeson
-----------------------------------------------------------------------------------------
drawing the hotbar function
Create a new function called drawbutton and open it.
Under this tab we create the button that going on the screen, but without the texture of the button yet. This will not tell where is going to place, but draw the item to call for.
Under the details panel in drawbutton create  7 inputs
-locationX     float
-locationY      float
-hit box name    Name
-button texture 2d          texture
-scale              float
-sizeofhitbox                     vector 2d
-text                string
From draw exec draw texture simple and exec from that draw text and finally exec add hitbiox
From drawbutton connect location x and y to draw texture simple of screen x and y ( x to x and y to y)
From drawbutton connect hit box name to name in the add hit box
In drawbutton connect scale  to  scale in draw texture simple
Do the same for button textue to texture
In drawbutton connect size of hitbox to size in add hit box
Connect text draw button to text in draw text
In add hit box exec from position make vector 2d  and connect x and y to location x and y to draw button( x to x and y to y).
Now go back to you editor and create font under right click userinterface> front and create any type of front you want to be . This will display the number in the hot Bar like in a mmo and go for a front size of 20.
Go back to bp_hud in drawbutton go to the draw text and in font select the font you just created
Then your done with this part
----------------------------------------------------------------------------------------------------
Drawing hot on screen

-----------------------------------------------------------------------------------------------------------------------
sendind textupdate 1

                          Create a new blueprint and in the blueprint column you find a blueprint interface and create it.
From her rename the new funcation 0 to sendtextureupdate1 and in the deatial panel on the left click on the new button under iputs created inputx and then inputy, then in the out put you will created output x and then output all of them will float.
Then you will create a new function and create 4 more and call then sendtextureupdate2, sendtextureupdate3, sendtextureupdate4, and sendtextureupdate5 and you will do same thing in sendtextureupdate1 in detail for inputs and outputs.
After creating all five of them you will be done with this blueprint
You create a new blue print and it will be a HUD base blueprint
Now  open it and go to event graph in the tab and be in it
Now create a new function and call it draw hot bars and then create 5 more funcation then called them hotbar1, 2, 3, 4, and 5
Double click in the drawhotbar under myblue print tab in the left. If you can’t find it or close it go to the top or under real and left side go to window and go down to my blueprint it should open it or highlighted for you.
Now in the drawhotbars tab now drag off, under call function select drawhotbar to hotbar1

done
--------------------------------------------------------------------------------------------------------------------
sendingtextureupadte2
In the sendtextureupdatehotbar1
Drag out to create a branch
In the condition of the branch is dragging out to AND Boolean
From the top of that drag out to equal (integer)  from the top of that equal connect get hitboxpress and  the bottom value would be 50
(From sendtextyreupdate create two in and out. For the in make them input x and input y, then the output it is going to be output x and then output y. (this is created in the pb
_hud_interface blueprint)
From the branch drag out from true and set updatexlocation and drag out to then set updateYlocation
And from the updateylocation connect to the return node
Right click and get player controller and drag out from it returnvalue to get mouse postion. You will connect the value of location x and y to the update x and y location
From branch in false drag out and se updatexlocation then to set updateylocation and connect to the RetrunNode
 From the two set you created from the flase connect those the input of x and y from the szendtextureupadte to the update x and y location to x to x and y to y.
From the ReturnNode from output x and y from drag out and get updatexloaction and updateylocation
To x to x and y to y.  now where are with the textureupdatehotbars
Now you will five of these more and name then sendtextureupdate1, sendtextureupdate2, sendtextureupdate3, sendtextureupdate4, and sendtextureupdate5
You will use the same format and reconnect then, but you change the vaule of the equal(integer) to 51 then to 52, 53 and 54 on each of the hotbars update texture
Then compile and save


------------------------------------------------------------------------------------------------------------------

the tab button
go into the 3th person blueprint and open it then open the level setting up the level, but it is not locate in the blueprint, but where contetbrwser and other tabs are. where we going to add a new button to be register and under engine>engine input >action movement press the add button and name it tab and clokc on the triangle to open it and find it that bar the taab button. done save.
-now we add a new button to be register, but nothing going to happen when we press it and we now need to give it function when we press it.

-------------------------------------------------------------------------------------
the event graph
----------------------------------------------------------------------------------------------
updating the texture

---------
missing_fix
go the 3rd person charter blueprint and add a function and called it ivetory and make a 2d vector and arria(clicking on the 9square the the right of it and the icon should change to a bar to 9 square in the function tab).