Yet another FPS blueprint tutorial

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?

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…
Go to your projects folder, (default will be in your documents) open up defaultengine.ini,
add this:


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:

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.

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.

Oh, in other news, someone I know from way back, is the CEO of a big data center, he set me up with a virtual machine running 2012 r2, so eventually I plan on working on a master server solution so Steam is not the only option we have for hosting.

That sounds so EPIC!
see what I did there… lol

So, will we learn how to store player’ data… Kills, deaths(KDR), hours played, etc? :smiley:
I’m so exited :smiley:

BTW, has anyone requested to epic developers for the prone feature/capsule setted to prone to be added?

That’s the plan.

Someone should submit such a request… they used to have a trello for that, but I can never find where to report stuff anymore.

I asked the question, I hope It made sense. Waiting for a response… Maybe if we vote up, they might see it faster, IDK :smiley:

Hi Guys,
i’m working again here, but i have a problem right now. When i was working on my project following this tutorial step by step everything worked. but actually i lost the cause a new PC, i opened a new project and followed the tutorial step by step again, but it doesn’t work. When i click Host button, it doesn’t host anything.
there is someone so gentle to help me?
I controlled everything a lot of times and watched the totutial again and again…but nothing, everything is right…i don’t understand where is the problem.

Thank you

look at post 344. if you do not have an onlinesubsystem defined in your ini file, it will not work.

Thank you man, i always forget this step hehe

Arbopa look at your pm… I think I found the perfect way to make hit detection/damage.Unreal Engine 4 Dealing Damage Advanced - YouTube

Yeah, that’s what ToxinGaming was talking about with the physics material stuff. Still haven’t had time to sit and fiddle with that.