Download

Yet another FPS blueprint tutorial...

PDF here.

Project file here.

People should watch that to learn animation better. :wink:

I will probably watch it later tonight.

@akalovemaker … watched the video… yeah, if you add a variable ‘aim_pitch’ of type Rotator… change some of the event graph in your animation BP to look like this:

44e090c32be2f7554c453adf0d1c585f9d31af92.png

And the animgraph to look like this:

you will get the same thing without the blend space stuff… this would not use our other aimPitch (float) variable… that would stay at 0… so you could maybe make a 1D blendspace that just has the center aiming for pistol, hip rifle and aimed rifle, and use that instead of the Aim_BS… feeding the proper whichWeapon into it…

I do not know which is ‘better’… but I did the above and I get a lot of jitter or vibration in the hands when you are pitching up and down. BUT it does keep your vision in the right spot for any aim adjustments per your weapons.

will update PDF with this.

awesome…

Just wanted to say thanks for the excellent tutorial, it’s nice to see how to lay out a good game structure. The make a game tutorials are all well and good and you can learn a lot however it’s a bit like learning to play a musical instrument learning a song won’t make you a musician. I am currently digesting every tutorial and build I can find so this was a very welcome addition.

Where I can find this ShowLoading() node?
Btw, I had to cast the PlayerController() to L_Player_Controller or the Create Advanced Session() fails.

I’m stuck at Menus part 2:

Don’t really know what’s happening that part of the tutorial is kind of confused :frowning:

By the way, why don’t you make a video version of the tutorial?

You could monetize it on Yotube.

edit: Nevermind I missed advanced Blueprints.

In Leave_Current_State, you need to set the input to the ENUM, not a byte. Otherwise the proper thing does not show up.

I suggest you go back a few posts and get the PDF of that part, it includes a lot of changes and fixes.


Am working on adding a rifle and pistol and damage… kinda needed for the next part. Found a strange thing, if your weapon has a collision, for some reason when you move, you are always forced away from it. Very strange.

yeah, I edited, as I said I didn’t have the Advanced Blueprints plugin installed correctly…:frowning:

I’m having a problem now when trying to show the Main Manu over the Background:

That’s my Main Menu widget (it’s a modification of an old project of mine, but that should not be an issue):

This is my game instance blueprint:

Double checked twice the guide, I’ll check the pdf in case I forgot something.

the leave currrent state in start_game needs to be set to startup, not main menu. that is in the tutorial.

I’m replying my self here, the cast to player controller won’t work either, I forgot to connect a pin, lol.
So, I’m stuck because ‘Create Advanced Session’ always return failure.
Any tips on how can I debug to find what’s going wrong?

http://i.imgur.com/GbNkW1Qm.png

you HAVE to have something set for your online subsystem, even if it is just NULL, otherwise you will always get a failure.

Either wait more, since he explains how to do this clearly after in the tutorial…
OR…
Go to your projects folder, (default will be in your documents) open up defaultengine.ini,
add this:

[OnlineSubsystem]
DefaultPlatformService=Null

You might need to change this later on…

it depends if arbopa will go with the steam servers (you might have to get the default port and ID that steam gives to test games) or after you greenlight a game on steam if you want (then they will give you an unique ID)

I don’t know if arbopa will do a custom build for dedicated server, so that people can pay/rent a host to have their servers. I personally think it will be awesome since it’s what most people want, but it’s very time consuming… I would say the steam route will be awesome and then go with dedicated when all the features are in and ready for multiplayer… You can see most of this solutions that can help you through out this thread. Just take your time and read some problems people have faced since you are probably just repeating someone’s problem and the solution is right after.

Don’t be lazy, since if you are, programming and game development won’t be your thing. :slight_smile:
Not saying you are of course…
Have a nice day…

a dedicated server would be great. right now I am banging my head against a wall getting a rifle and pistol in and firing and doing damage, as we need that for stats for the end of game stats and such … and of course the scoreboard… for the next part about in game states and timers and such.

Are you planning on doing projectiles or raycasts for your weapon damage? I have raycasts and damage from rifle/pistol working with networking if you get stuck.

I was set on projectiles as it can offer more ‘realism’… but I guess I should set up for both, then anyone that follows along can pick and choose what they want to do. Would be interested in what you have for damage. I know I have looked at the built in damage stuff and it always seemed something was missing… and have looked at using interfaces to have a do_damage function that can be included in all characters… not sure which way is better.

Do we just want hits and damage or hits to different body parts that do differing damage based on where they are hit? Or is that far too complex for this?

Doing differing damage based on where they are hit is not difficult at all, for raycasts anyway. You have to create a physical material for each body part that can be hit, e.g. head, torso, left arm, left hand, etc. and then set everything up in the PHaT. Also, in the physical material, you can set the Destructible Damage Threshold Scale to numbers between 0 and 1, like 1 for head, .25 for torso, .1 for arm. The hit result of a raycast can return that information, which then can be multiplied by weapon damage to get the amount of damage to be done to the character, which can be then passed on to another function.

At first I did the interface route. But that was before I worked on networking. When I started networking, I found it much easier to do the Apply Damage / Event Any Damage combination and also thought about the security of health and damage, which I feel should rely on the server instead of the client.

The main gist of how I do the firing / damage is this:

  1. Client calls function that calculates firing vector
  2. Client sends vector to server (might move calculate firing vector to server as long as performance doesn’t take a hit and instead just send the actor who did the firing and let the server calculate the vector)
  3. Server calls a Fire event which executes on all clients. This event calls Fire on weapon blueprint so sound, impact, particle effects can be seen/heard across all clients.
  4. If the client can fire (has bullets left) proceed to raycast. This is so when the client doesn’t have bullets, still call the Fire on weapon blueprint for everyone to hear the empty trigger pulls, but there is no raycast.
  5. (Server) Use firing vector to perform raycast.
  6. (Server) From the Hit Result, calculate damage (hit result has the phys mat, which the destructible damage threshold scale can be pulled from and used to calculate total damage) and apply damage to the hit actor (also from hit result).
  7. Event Any Damage will subtract health based on the incoming damage and will set an boolean if health goes below zero.

The rest is a bit hazy as I’m not looking at the code right now. But what happens is if the damage is lethal, the client will go into ragdoll (executes on all so everyone can see the other player’s death) and will no longer have pawn collision nor input.

If this is confusing, I’ll try and get some screenshots of all of the function calls. It’s a bit messy so I’ll have to clean up the lines.

If you want more information on projectiles and their damage, I suggest looking at that multiplayer cowboy shootout directly from Epic. That’s partially where I learned to do the server damage stuff.

arbopa isn’t it better if you add the realistic weapon blueprints from the marketplace to the project. It will save you time and help a fellow ue4 developer. Also, it looks really easy to add new weapons: https://www.youtube.com/watch?v=K8lX4NF6YgU

I’m with you on this.

I’m pretty against marketplace plugins (they can always be not updated, in fact realistic blueprint weapons still has seen no update for 4.10) and buying marketplace content, but honestly arbopa you’re doing waaaaaay too much on your own. People not interested may aswell develop their weapons on their own…And someday you could get back to this.

Anybody I got a problem here, how do I select my game mode class here?

If I type the same game mode I put into my .ini file nothing happens.
https://photos-4.dropbox.com/t/2/AADbXyid244Owfeae7m1eNdt4h1Fp2Y4tx2XV63-Mq9oIg/12/167904170/png/32x32/1/_/1/2/Screenshot%202015-12-09%2021.59.40.png/EJS18H8YuDIgAigC/GgQXiWUuxSodzNoaXvCQmFj3doel0dXreuVV4g86bHw?size=1600x1200&size_mode=3

edit, fixed, I was calling the wrong blueprint.

I will have to look into how to assign such materials to the characters, sounds like a good way to do things. Thanks.

Sounds like the way to go, if projectiles return the material hit like traces, then for sure, that way they can both do damage based on where the hit is. Thanks for the info.

Ah, good, as I was gettting a 403 error at your link.

I purchased that a while back with the intent to use it. But if I add stuff from the market place, I can not keep zipping up the project as I get to certain points for others to download. What I plan to do for weapons will be pretty basic, and later I will incorporate the other stuff like that into it and probably do a tutorial on it.