Friday, 20 October 2017

Weapon mechanics

I first Started by creating three custom events for what i want to happen, pull trigger release and fire. From the pull trigger I added a DoOnce node that makes sure what ever happens only happens once, linked up to a Target Actor node selecting gun so it will fire from the gun, and then set timer to 1 divided by 7 as rounds per second however my code seems to only fire once in general so I am looking to fix it.

The first not is and event beginplay, so when the game starts its plays this piece of code. Its then hooked up to a sequence which allows me to add multiple beginning play codes but for no it only has one. The spawn actor makes it spawn in the world then i set it to spawn on a arrow component by the side of our character. the bit at the bottom is my basic shoot mechanic ive done where left clicking fire ive not figured how to make it semi-automatic as it is a Gatling gun.
For the material of the weapon i used a simple material changed it to addative so it only makes it look brighter, and for the coluor i had this of shade of green into a multiply with a param that changes the brightness of the colour.

Thursday, 19 October 2017

Zombie Ai

For the zombies i used a player sensing node to make the zombies follow me. The cast too node allows it to identify the player or what it should follow and the move to sets to the location of the player so it knows where the player is at all times.

I wanted to give the zombies a more of a random walking before they see me, so they look a little more alive rather then just being statues. Event start into some branches gives the set up of if its calculations for whether its in range or not or moving or not, AI Move To node gives the zombies it intelligence to move to and random location with in the parameter. Get actor location and get random point node allows the zombie AI to give it a point to walk to at a random point in a radius.