#multiplayer

1 messages · Page 387 of 1

winter plover
#

doesnt unity also have some form of it now?

fossil spoke
#

Probably

#

I havent worked with Unity in years

sharp spire
#

what is CE?

#

ive never heard of snowdrop or CE

fossil spoke
#

CryEngine

sharp spire
#

i was considering Unity because it can be used for any genre of game right?

#

oh...

fossil spoke
#

Snowdrop is an Ubisoft engine.

sharp spire
#

i have CE installed lol

winter plover
#

is that what they call their branch of CE now?

#

or is that yet another thing

sharp spire
#

i dont believe it uses nodes

fossil spoke
#

No Snowdrop is completely different Engine

#

LumberYard is an fork of CE

winter plover
#

yea but that was the amazon one wasnt it

fossil spoke
#

Yes

winter plover
#

I mean like the fork that they did since Far Cry 2

fossil spoke
#

Its still an CE fork though

sharp spire
#

is Snowdrop not available to the public?

fossil spoke
#

No

sharp spire
#

welp. useful.

#

lol

fossil spoke
#

Well i was just saying, it also has node scripting

sharp spire
#

Fair enough haha

#

so my best bet is probably Unity

#

CE also isnt completely open to all game styles is it?

#

could a large mmorpg be made with CE

winter plover
#

I think usually MMOs are built up from scratch

#

because they DO need some sorta custom infrastructure

#

and that's easier if you build the engine from the ground up to be suited for mmos

sharp spire
#

a company hasnt built one yet with that in mind?

winter plover
#

not that I know of really

#

companies that build MMOs can usually just do that by themselves

#

I don't think it's exactly trivial to do

#

you could prolly do some research on it

sharp spire
#

so my best bet isnt to veer away from UE4, but rather mmos..

#

an mmo isnt hard to make, its hard to manage the players i guess :\

winter plover
#

well I wouldnt attempt those on your own and without coding experience tbh

#

handling large amounts of players alone isnt a trivial task

sharp spire
#

i do have coding experience, its just been quite a few years since i last wrote anything. but i learn very quickly for the most part

#

in the last two years ive learned several hard and organic modeling programs, various painting programs, a few world gen programs and how to make them all game relevant. so i've learned a lot fairly quickly. i just need to spend time researching on mmos and how they are made. in the long run i just want a game where players can make progress and show it off and work together to achieve things.

winter plover
#

maybe do a coop sorta game where you can invite other players into your world

sharp spire
#

if that can be achieved in unreal engine by splitting up players or something somwhow then ill do that. otherwise i think i have to find a new interest in game genres to do on my owen

winter plover
#

rather than a "true" mmo

sharp spire
#

own*

winter plover
#

like what you want sounds alot like dark souls kinda

sharp spire
#

well i was considering that, but how do i stop cheating that way :\

winter plover
#

weeell

#

you could do dedicated servers

sharp spire
#

i honestly want to remake a mobile game like Durango but not prehistoric

winter plover
#

but that means you need server infrastructure again

#

but not necessarily a complex consistent world

#

just something to host coop sessions on

#

and maybe a few lobby servers

#

where players can interact and screw around in

#

but its limited to a very managable area

#

and is essentially a glorified server browser

#

tl;dr try to scale down your expectations to something more managable with what you got to work with

#

and anti-cheat can still be possible with a listen-server sorta thing

#

just requires that all your clients do consistency checking all at once

#

could be a bit finicky

sharp spire
#

im going to give you a message, youve been very helpful. maybe somehow i can make this work. otherwise its back to the drawing boards.

meager spade
#

need a bit of help, int32 AZHordeGameMode::GetTotalPlayersInGame() { int playerCount = 0; AZGameState* GState = Cast<AZGameState>(GameState); if (GState) { for (APlayerState* cont : GState->PlayerArray) { playerCount++; } } return playerCount; } should return the amount of players in the game, problem is, when the game first loads up, it returns 1, regardless if 2 or more people are playing. Is there a way to wait till all players are ready?

#

ill change that to int32, just noticed that

winter plover
#

well this is a pure function right?

#

should be a matter of calling it in the right place

#

or modifying whatever condition is using this

meager spade
#

yeah, this is where i am calling it

#
        {
            StartMatch();
        }``` inside a timer which runs in a timer     GetWorldTimerManager().SetTimer(TimerHandle_DefaultTimer, this, &AZHordeGameMode::DefaultTimer, GetWorldSettings()->GetEffectiveTimeDilation(), true);
#

i thought that MatchState::WaitingToStart is when all clients have connected?

glacial pollen
#

How does a dedicated server create a session without a PC?

#

IF it creates its own session, why do clients not find it? (Works fine if a client creates a session, another can find and join)

meager spade
#

you run it as a server

#

and connect the clients on the port the server is running on

#

or you on about PlayerController?

glacial pollen
#

no

#

I am using Dedicated Server option in editor

sharp spire
#

Dedicated server option is running a few things for you. Normally you’d run the dedicated server yourself on your machine or a host, and other clients would connect to it via IP:PORT

glacial pollen
#

Well its screwing everything up. Its not real world use case. and therefore useless for development.

sharp spire
#

It is still real world use case.

#

You can run the server constantly instead of a listen host..

#

A listen host(alternate option to dedicated) has the first player as the host

glacial pollen
#

Sure, but since the built in dedicated option, ignore the dedicated map option, and automatically connects clients :
It loads the wrong map and then steals my clients!

sharp spire
#

Therefore if he loses connection, all players lose connection. On dedicated. It could be 0 players and the server would still be running

#

The map loads based on your map settings in your project settings

glacial pollen
#

hahahahahahah!

sharp spire
#

You have to setup your server map

glacial pollen
#

Have you tested this?

sharp spire
#

That’s how a dedicated server works. It is it’s own player without input.

glacial pollen
#

I know how it SUPPOSED to work

#

I'm telling you, in editor, thats not HOW it works

severe widget
#

the dedicated server in the PIE options?

sharp spire
#

The editor will still load the editor map.

#

Not the server map.

severe widget
#

Yeah, no, it'll open the map you're on.

sharp spire
#

Run in standalone with a dedicated server running and it’ll work.

glacial pollen
#

Anythign else?

severe widget
#

If you really need the most realistic thing you'll have to spawn separate processes and then set the net simulate stuff

glacial pollen
#

I have Use Single Process turned off

#

What is this net simulate stuff you speak of?

severe widget
#

ping me I'll bbl

glacial pollen
#

Here is the standalone version:

bleak cloud
#

Can anyone point me in the direction of some blueprint examples or projects with good multiplayer practices? Kinda been figuring things out as I go and I'm sure I'm doing many things wrong

glacial pollen
#

Don't be so sure of that. unreal has a nasty habit of doing weird shit

#

What works in editor, breaks in packaged games.

#

What SHOULD work in editor doesn't work, but works in packaged games..

#

However, for general networking stuff, look at the pinned stuff, top right

sharp spire
#

Askori you can ask me some questions I’m relatively new to understanding multiplayer. I’m starting to understand the majority of it now

#

Majority of how it works *

#

I also have a question for anyone in here a bit more experienced

#

Is it possible to host a listenserver and allow players to connect and play (obviously), but then allow certain players (on a list, not the hard part) to also save map changes and allow any of those players to become the listen host at any time to pick up progress without the original host (cheating isn’t a concern)

summer gazelle
sharp spire
#

Mp doesn’t use player index for controllers actually

#

That’s only for splitscreen local play

#

You’ll want to use get instigator or get controller and cast to player controller

summer gazelle
#

how do i differentiate between players and spawn them properly?

sharp spire
#

They will spawn on their own clients. Are you trying to choose where they are spawned?

#

Or does it not matter?

#

Each one would spawn based on joining properties (teams, etc) and spawn based on that

summer gazelle
#

Im trying to choose where they spawn based on player starts that ive placed in the level and tagged

#

when the game spawns they are put in an array and foreach loop that spawns players (whether or not any players have joined)

#

I feel like theres got to be a much better way to do it

sharp spire
#

well normally like i said, youd simply choose a "tag" before joining and in your begin play set coordinates to a matching tag

glacial pollen
twin juniper
#

Hey, this code is part of a function called PlayImpactEffects, on a projectile gun I'm calling it on the server (there it doesn't result in a crash) then replicating it using an OnRep variable, and calliing PlayImpactEffects on the OnRep function, but for some reason these If checks result in a crash when I call PlayImpactEffects from the OnRep function. I even commented the code inside the If checks, so I seriously don't get what's crashing it

glacial pollen
#

If a dedicated server does not have a PC, then how does it destroy or create sessions?

fossil spoke
#

A Dedi Server is the session.

severe widget
glacial pollen
#

Okay, here we go treating me like the idiot, and not assuming UE editor is just horrible

severe widget
#

?

glacial pollen
#

Then how comes clients cannot find sessions on a dedicated server?

misty stirrup
#

alrgiht so

#

i have net relevancy on characters

#

and on my itembase/just a static mesh actor thing

#

when i get out of range characters disappear

#

why teh fuck doesn't the static mesh

#

!!!!!!!!

severe widget
#

UE4 has many ways in which it is horrible, but that doesn't mean I don't find some way to embarrass myself using it on a daily basis

misty stirrup
#

what do you mean PC

glacial pollen
#

sure, but this ties into using the built in PIE dedicated server, I would hope everyone here knows its got quirks

misty stirrup
#

what do you mean PC

severe widget
#

what do you mean PC

glacial pollen
#

PlayerController

sharp spire
#

To test dedicated sessions, you need to host a standalone dedicated server, and standalone clients and then find session

misty stirrup
#

ah okay gotchya

sharp spire
#

to test properly *

misty stirrup
#

im pretty sure whe nyou compile a dedicated server it does the setup differently and doesn't require a player controller

#

basically the session IS the file

#

this is 100% a guess though

sharp spire
#

the dedicated server does have a controller i believe, but no input. i could be wrong. its either that, or no controller

misty stirrup
#

pierce do you have a link for testing post compile

#

like i just wanna get how to connect to a server via the packaged game and stuf

#

im typing like a retard today holy shit

sharp spire
#

id suggest for now just using non-dedicated

#

itll load up a server client and regular client

#

then you can test sessions, then host dedicated later

glacial pollen
#

@sharp spire dude you are starting to piss me off.

sharp spire
#

wut why

misty stirrup
#

ive been building around just dedicated though

#

so there's a ton of bugs for a server that is also a client

severe widget
#

......

#

a dedicated server with nobody in it will never have a controller

#

Ever.

sharp spire
#

theres your answer.

#

thats what i thought.

misty stirrup
#

can someone tell me why my actor won't hide it self when it's dormant

glacial pollen
#

Because you don't know what the hell your talking about, giving advice around here that is flat out wrong

severe widget
#

Pierce

glacial pollen
#

and if you tell me to use stand alone one more time, im going to gladly take an infraction

severe widget
misty stirrup
#

jesus christ stop filling the chat with edginess

glacial pollen
#

It didn't work the first time, and it sure didnt work again (tried it, just for you, just now, so I could be sure I didnt need to eat my words)

twin juniper
#

Does anyone know the answer to my issue?

sharp spire
#

right after i wrote, "i could be wrong and it has no controller"

misty stirrup
#

repost it

#

@twin juniper

severe widget
#

Fair

twin juniper
#

Hey, this code is part of a function called PlayImpactEffects, on a projectile gun I'm calling it on the server (there it doesn't result in a crash) then replicating it using an OnRep variable, and calliing PlayImpactEffects on the OnRep function, but for some reason these If checks result in a crash when I call PlayImpactEffects from the OnRep function. I even commented the code inside the If checks, so I seriously don't get what's crashing it(edited)
https://pastebin.com/6yNNKj0z

#

I've been stuck with this for a few hours. It doesn't make any sense

severe widget
#

looking now

misty stirrup
#

uhhh this is just like

bleak cloud
#

I don't have an answer, but have you tried stepping through it in a debugger?

sharp spire
#

im here because i have questions. if someone posts something and nobody talks because they dont care to answer, ill share what i have to say. looks like this isnt a discussion anymore. ill just post questions.

twin juniper
#

How can these IFs checks result in a crash?

misty stirrup
#

well like

severe widget
#

you said it crashes?

twin juniper
#

Yes

misty stirrup
#

it might not be the if statements

#

it might be the logging

severe widget
#

And there's nothing else, at all in your OnRep

misty stirrup
#

UE_LOG

twin juniper
#

I've added the logging after

severe widget
#

UE_LOG crashing would be cause for concern

misty stirrup
#

try changing the ifs to true?

#

just to ensure it's actually the variables being called by the ifs or not

severe widget
#

I'm guessing one of two things, the more likely is something else in your OnRep being called

misty stirrup
#

^ ye

twin juniper
#

That's the part that's crashing it

severe widget
#

Cause the other is that your object is null when called

misty stirrup
#

if you mark them as true, you know it's related to the variables

twin juniper
#

I've looked at the crash logs

misty stirrup
#

well like

severe widget
#

Post your entire OnRep?

misty stirrup
#

it might be what the variables are being set to

severe widget
#

Soren its a check that it isn't literally nullptr

misty stirrup
#

so try just changing them to true so it runs the code without even checking the variables

severe widget
#

and the UE_LOG doesn't actually deference it

#

So either the object is null or its something else

twin juniper
#

That's what causing the crashes, If I comment it, it doesn't crash

#

here is the crash log:

misty stirrup
#

i never said ue_log is deferencing it

twin juniper
#

[2018.04.15-03.44.49:635][834]LogWindows: Error: [Callstack] 0x00000000AF306626 UE4Editor-MicroVoltsClone.dll!AGun::PlayImpactEffects() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\gun.cpp:138]
[2018.04.15-03.44.49:635][834]LogWindows: Error: [Callstack] 0x00000000AF30D735 UE4Editor-MicroVoltsClone.dll!AProjectile::OnRep_Exploded() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\projectile.cpp:99]

severe widget
#

this->DefaultImpactSound will crash if the this is null

twin juniper
#

@misty stirrup change what to true?

misty stirrup
#

just humour me and change defaultimpactsound, defaultimpactfx, and defaultbulletdecal to true

#

and yeah we'll need the onrep function too to actually get down to the problem

#

cuz this isnt enough info w/ the code snippet to find it

twin juniper
#

It's just a linetrace that passes a FHitResult to play impact effects

#

it's not the issue

severe widget
#

Also

twin juniper
#

What do you mean by changing it to true? Like the if check?

misty stirrup
#

okay then print defaultimpactsound, defaultimpactfx, and defaultbulletdecal

severe widget
#

this seems like a multiplayer issue, but only because of the OnRep

misty stirrup
#

or i guess UE_LOG it

#

like its 100% defaultimpactsound, defaultimpactfx, and defaultbulletdecal, so however you're setting those is janky

twin juniper
#

It's not the UE_LOG, like I said I only added those to check what the problem is

#

I'm setting them in blueprints

#

This crash doesn't make any sense, because I'm not even doing anything

#

just checking

misty stirrup
#

that's why

#

you're setting them in blueprints

twin juniper
#

?

misty stirrup
#

they start as null in c++

#

ok so

#

C++ runs first

#

THEN blueprints

#

so at the moent that's called

#

they're nothing

#

meaning it crashes

#

you need to set them to something before blueprints

twin juniper
#

Still doesnt make any sense, I'll explain

#
  1. They are EditAnywhere values, so I just change them there instead of doing that in C++
#

It works just fine everywhere else. On LineTrace guns, and on the Projectile guns as well, but when I'm calling it from the server

#
  1. Even if they are null (and they are not), that's what I am checking... why would it crash?
misty stirrup
#

okay so like

#

im still pretty sure

#

on the server side

#

the variables are blank somehow

#

im prob wrong

#

who knows

twin juniper
#

Even if they are, why would it crash?

severe widget
#

Soren, its an OnRep.

#

Initialization has long since happened

misty stirrup
#

oh shit okay

twin juniper
#

This just seems like a really weird bug

misty stirrup
#

i got you now

severe widget
#

if (0) does not crash

#

why would if (nullptr) crash

misty stirrup
#

check if it crashes via blueprint nodes with a similar setup

severe widget
#

(hint, this is nullptr)

twin juniper
#

The thing is that I'm also calling that PlayImpactEffects on an OnRep function in LineTrace guns, and it works just fine

severe widget
#

Why you got a nullptr UObject that has its OnRep called @twin juniper

#

That's fucking weird, don't do that

twin juniper
#

What do you mean?

severe widget
#

that's the only thing it can be, if you've shared your entire OnRep function with us

misty stirrup
#

yeah like you seriously just need to send the onrep function so we can actually look at the full thing

#

otherwise you're just rubberducking us

twin juniper
#

It

#

it's a linetrace that's it

severe widget
#

If you want outside coder help, PLEASE give us the fucking function

misty stirrup
#

i would still like to see it

twin juniper
#

I'll, I just don't get why it matters

misty stirrup
#

i dont care if its a fucking single line of code it's nice to know wthe full picture

severe widget
#

I'm NOT gonna play guesswork backseat coder

misty stirrup
#

like without the function we're literally guessing

twin juniper
#

GetWorld()->LineTraceSingleByChannel(Impact, StartTrace, EndTrace, ECC_Visibility, TraceParams);

Gun->PlayImpactEffects(Impact);
#

That's not why it's crashing tho

#

I've the logs

#

Once I comment these IFs checks it stops crashing

#

that's the onrep function

misty stirrup
#

maybe like

#

sanity check from default impactsound and default bulletdecal

#

somehow

#

like

#

make sure the actor exists before you run it?

#

see if that helps at all

severe widget
#

So if the if statement isn't there, you don't get a crash?

twin juniper
#

Which actor?

misty stirrup
#

self

twin juniper
#

Yes

misty stirrup
#

i know it sounds really stupid

severe widget
#

what even

twin juniper
#

which is why it doesn't even make sense

severe widget
#

jfc

#

dude sounds like a gnarly race condition

twin juniper
#

how does it even crash

severe widget
#

so you know how OnRep is a member function?

twin juniper
#

Self where? on the on rep or play impact effects?

severe widget
#

the only way if (ptr) can crash is if the implicit this is actually NULL or an access error

#

this->ptr

#

which is why I'm so skeptical that its actually crashing on if (ptr)

misty stirrup
#

did you ever

#

print the defaultimpactfx

#

etc

twin juniper
#

no

misty stirrup
#

like fuck using them as if statements just get them to print

#

do that

#

like

twin juniper
#

Print what tho? their name?

misty stirrup
#

maybe server needs to call it differently

#

yeah

#

name

glacial pollen
#

🍿

twin juniper
#

@severe widget It does tho

#

The weird thing is, I'm calling the same function

#

once the projectile hits something

#

and it doesn't crash there

#

only when calling it from OnRep

misty stirrup
#

lol

#

so uh

#

when it hits something

#

its prob the key here

twin juniper
#

I'm calling PlayImpactEffects

#

it's only spawning the effects for the server obv

misty stirrup
#

can u post full playimpacteffects

twin juniper
#

so I'm replcating it with OnRep

#

yeah a sec

severe widget
#

alright I'm willing to admit there's some shenanigans going on here that I don't know about... but without the greater context, I'm stumped.

#

Best of luck, I'm off to crash a f5e

twin juniper
#

I'm going to try logging the name in a sec, but is there any chance it's some kind of an engine bug?

#

Like everything else but those IFs checks are commented out right now, and it's still crashing

misty stirrup
#

if you can't find very specifically

#

what's causing the engine bug

#

it'll be hard to write it as a bugreport

#

so it's best to figure out what it is to report it anyways

twin juniper
#

Yeah I'm aware of that

misty stirrup
#

i personalyl dont think its an engine bug

#

because like replication is pretty specific in what you're required to send over etc

twin juniper
#

Here, commented it out and it won't crash

#

@misty stirrup I'm not even sure it's replication, I honestly don't know what's going on in there

misty stirrup
#

im pretty sure it has to do with like

#

the vector location of the decal

#

or whatever

#

that's why i keep asking for the FULL function not snippets

#

like

#

im guessing the trace is done on server

#

or client

twin juniper
#

That's not just the decal

misty stirrup
#

like

twin juniper
#

I'm not spawning

#

the decal

#

it's commented out

#

It's the IF check

misty stirrup
#

i really wish you'd still

#

fucking

#

post it

twin juniper
#

Post what? I already did

misty stirrup
#

lol

twin juniper
#

you wanted the OnRep

misty stirrup
#

you posted like

#

the trace

#

and not the start of the function name

#

etc

#

and the closing of the function

fossil spoke
#

@Itsco#6231 wheb you ask for help please provide full code examples. You really are making this difficult.

twin juniper
#

@misty stirrup I didn't think this would be useful, the other part is just setting up these StartLoc and EndLoc for the linetrace

misty stirrup
#

i have literally no idea what your decal function does

fossil spoke
#

What may seem irrelevant to you could be part of the problem. Use pastebin and post the entire function

misty stirrup
#

or what these variables are used for

#

you explaining what you WANT it to do won't get it fixed

twin juniper
#

@misty stirrup What does it have to do with Decal function? I don't even have one lol

misty stirrup
#

or whatever the fuck this thing does man

#

it'll let us use proper language for it too

#

because i have no idea what you're doing with this code, and having the code will help understand how to talk about this variables, hlep find what is causing them to act this way, etc

twin juniper
#

It's commented out man, it has nothing to do with the crash

misty stirrup
#

n the onrep

twin juniper
#

I've sent it already

misty stirrup
#

n the variable

#

o

#

sorry

#

idk i lost it

twin juniper
#

GetWorld()->LineTraceSingleByChannel(Impact, StartTrace, EndTrace, ECC_Visibility, TraceParams);

Gun->PlayImpactEffects(Impact);
misty stirrup
#

and the header file

#

that's NOT THE FUALSDfcalscaocadspfa

#

full code

#

from start of function to end

#

including the ue4 macros u might need to set up the onrep function

twin juniper
#

FVector Dir = GetActorForwardVector();

const FVector StartTrace = GetActorLocation() - Dir;
const FVector EndTrace = GetActorLocation() + Dir;

FCollisionQueryParams TraceParams;
TraceParams.bTraceComplex = true;

FHitResult Impact;
GetWorld()->LineTraceSingleByChannel(Impact, StartTrace, EndTrace, ECC_Visibility, TraceParams);

Gun->PlayImpactEffects(Impact);
#

UPROPERTY(ReplicatedUsing = OnRep_Exploded)
bool bDidExplode;

#

UFUNCTION()
void OnRep_Exploded();

#

I can remove the if check, and just set ImpactSound = DefaultImpactSound

#

ImpactFX = DefaultImpactFX

#

but it will crash

#

For unknown reason the DefaultImpactSound, DefaultImpactFX are null when calling PlayImpactEffects from OnRep

#

but that's why I added the IF check

#

So why in the world does it crash when all I'm doing is an IF check?

misty stirrup
#

did you ever get around to printing the variables

twin juniper
#

Forget it, hold on

misty stirrup
#

idk if ue4_log does the server: 'print stuf here' client: 'stuff u printed here'

twin juniper
#

You see now why I said the other code won't help

misty stirrup
#

it is helping

#

because it's widdling it down

#

adn you didn't actually give me the full header

#

you gave me another snippet

#

lol

twin juniper
#

you asked for the OnRep

#

the other part is unrelated

misty stirrup
#

and the header file

twin juniper
#

from the header file......

misty stirrup
#

ok i give up

twin juniper
#

It's crashing just printing the names

misty stirrup
#

yep

#

there we go

#

try running it only on server

#

or only on client

twin juniper
#

I said it's crashing only when called from OnRep

#

the function also gets called when the bullet hits something

#

which happens on the server

#

and works just fine

#

What I think is happening is that for some unknown reason, DefaultImpactSound, DefaultBulletFX and DefaultBulletDecal are null when called from OnRep

#

That's weird by itself, but it's getting more weird when I'M TRYING TO CHECK IF THESE POINTERS ARE NULL and that causes it to crash

#

UE4Editor_MicroVoltsClone_2695!AGun::PlayImpactEffects() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\gun.cpp:139]
UE4Editor_MicroVoltsClone_2695!AProjectile::OnHit() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\projectile.cpp:72]
UE4Editor_MicroVoltsClone_2695!AProjectile::execOnHit() [f:\epic games\projects\tpsgame\source\microvoltsclone\public\gun\projectile.h:17]

#

execOnHit is new

misty stirrup
#

make a variable

#

okay so

#

make 3 new variables

#

set those 3 new variables in the beginplay to the defaultvariables you have

#

then call those new variables one at a time

twin juniper
#

Call them where?

misty stirrup
#

like

#

into the print

twin juniper
#

print in BeginPlay?

misty stirrup
#

no like

#

set it up in beginplay

#

whatever the c++ equiviliant to begin play is

#

i still think im correct about the fact you're calling an onrep in c++ for variable that is set in blueprint

twin juniper
#

What do you mean?

misty stirrup
#

okay like

twin juniper
#

it's not related

misty stirrup
#

did you do the thing

twin juniper
#

My PC crashed so not yet

#

There is something really weird going on with this

misty stirrup
#

like i dont know how to explain this

#

basically onrep can't point at null shit

#

like

#

it's pointing at something

#

im 100% sure without having to look at the code

#

basically

#

like

#

you can't send null shit upstream

#

so sanity check it

twin juniper
#

Nothing is null

#

at least it shouldn't be

misty stirrup
#

it is though

twin juniper
#

yes

misty stirrup
#

sanity check it

twin juniper
#

which is an unexplained issue

misty stirrup
#

sanity check it

#

if it STILL crashes after filtering out the null stuff

#

before you call the sound function

#

like

#

sanity check by setting it to a non-blueprint variable like i was saying

#

in beginplay

twin juniper
#

How is it related? These variables are setup through the editor to prevent hard-coding these values in C++, they get setup long before the projectile hits something

#

And also, it works just fine

#

when it's called anywhere else

misty stirrup
#

you're not

#

hardcoding

twin juniper
#

I'm calling PlayImpactEffects from a lot of other places

misty stirrup
#

these variables in C++

twin juniper
#

and it all work fine

misty stirrup
#

the goal is to

#

okay so

#

like

#

set the defaultvariable to the newvariable that is not blueprint editable anywhere

twin juniper
#

I understand Soren, what I'm saying is that the reason I'm doing it is to not hard-code these values

#

and it's unrelated

misty stirrup
#

you're not hard coding them though

#

just do the thing

#

if it works after doing this thing

#

its 100% either a bug

#

or like i was saying you're having this thing in blueprint that's set on the scripting layer

twin juniper
#

I don't mind doing it, I'm opening the editor since my PC crash

misty stirrup
#

thats then called in C++

twin juniper
#

I'm saying, that's it's unrelated

misty stirrup
#

and ue4 doesnt like that

#

like ive done something like this before regarding something else

#

and i totally get its different

twin juniper
#

But it's working eveywhere else

#

It even get's called on a different OnRep function

#

on LineTrace guns

#

and it works fine from there

misty stirrup
#

send that different onrep function i guess

#

that's weird af

twin juniper
#

it's just another LineTrace

misty stirrup
#

huh

twin juniper
#

and then I call PlayImpactEffects

misty stirrup
#

did you ever send the full header

twin juniper
#

and pass it the Fhitresult from the Linetrace

#

I sent everything that's related

misty stirrup
#

i

#

you're so frustrating

#

if it's working in one area

#

in a different onrep

#

and its not working in this onrep

twin juniper
#

Thanks for your help dude, but the other code just got nothing to do with it

misty stirrup
#

there's obviously something different in the header

#

im asking for the header dude

#

where you define the onrep

twin juniper
#

I've sent you everything that's related from the header dude

misty stirrup
#

onreps

twin juniper
#

I've sent it, I'll resend it

#

UPROPERTY(ReplicatedUsing = OnRep_DidExplode)
bool bDidExplode;

#

UFUNCTION()
void OnRep_DidExplode();

mint umbra
#

is dis a bad time to ask about networked player movement 😇

misty stirrup
#

nah

#

goahead

twin juniper
#

void AProjectile::OnHit(const FHitResult& Impact)
{
TraceFXComponent->Deactivate();
ProjectileMesh->SetVisibility(false);
if (Gun)
{
Gun->PlayImpactEffects(Impact);
}

if (Role == ROLE_Authority)
{
    bDidExplode = true;
}

ProjectileMovementComponent->StopMovementImmediately();
SetLifeSpan(1.f);

}

#

Here is another place I'm calling it

#

works just fine

#

that's also where I change bDidExplode

misty stirrup
#

yeah okay

#

just add the sanity check for gun

#

into ur othre code

#

snipper

#

and i bet it'll work

twin juniper
#

It won't, but sure give me a second

mint umbra
#

i understand that its important for the authoritative server to handle as many things as possible to make it harder to cheat..

does this mean i should be moving players from the server? like if a client presses W to move forwards, should it be asking the server to move the player character forwards?

#

ive read so much on this but i dont think im really grasping it

misty stirrup
#

uhhhh

twin juniper
#

UE4 takes care of that

#

for you

#

with the movementcomponent

misty stirrup
#

so like

#

yeah

mint umbra
#

gotcha. thats what i was wondering.

#

thanks guys and good luck with whatever youre dealing with

twin juniper
#

@misty stirrup crashed

#

told you it's unrealted

#

Something really weird is going on there

misty stirrup
#

never sent me the header for onhit

#

this is why

#

i asked

#

for the full header

#

like 8 times now

#

i keep h aving to ask for shit

#

lol

twin juniper
#

It's just a function

#

How is OnHit related?

misty stirrup
#

so that isn't another onrep?

twin juniper
#

that's not crashing it

misty stirrup
#

this is why

#

i keep asking for a header

#

do you not udnerstand how much time we've wasted

twin juniper
#

OnHit is calling PlayImpactEffects, but it's only doing so for the server

misty stirrup
#

just from me not being able to see the header

twin juniper
#

@misty stirrup Dude, I've sent you everything in the header that's related

#

the other part is useless

#

it's too long

#

there is no point making you go through hunders line of codes

misty stirrup
#

i wouldnt look through hundreds of lines of code

#

i'd look at the variable section

twin juniper
#

Right, so that's why I sent what you need to know

misty stirrup
#

and feel comfortable with the fact

#

that you did indeed send me the full thing

#

so i dont feel like there's anything left out

#

and i dont have to go

#

'hey

twin juniper
#

There isn't

misty stirrup
#

is there another function i dont see here?'

twin juniper
#

no

#

There are, but not related

#

I said that OnHit is changing bDidExplode

misty stirrup
#

we just spent one minute exchanging if there's another function that might be replicated

#

but hey

#

if you sent me a header

#

that'd be 5 seconds in my head

twin juniper
#

and it's also calling PlayImpactEffect, only that in that case it doesn't crash

misty stirrup
#

you're basically making me use the language part of my brain to ask you a question i'd know the answer to instantly if i just had the full header

twin juniper
#

I'm also calling PlayImpactEffects for the LineTrace gun, for the client but I'm also calling it there from an OnRep function

#

which works just fine

misty stirrup
#

okay well

twin juniper
#

@misty stirrup Listen, I'm thankful for your help, but if you don't want to listen to me it's pointless since you are just wasting your time

misty stirrup
#

do the defaultvariable(blueprint editable anywhere) = newvariable

#

like

twin juniper
#

I did it like I said

#

it crashed

misty stirrup
#

where did you do it

twin juniper
#

in beginplay

#

and then checked

#

if(newvar)

#

on playimpacteffects

#

and it crashed

misty stirrup
#

are you uh

#

is this actor

#

the BluePrint instance

twin juniper
#

what is an actor?

misty stirrup
#

or the C++ instance

#

see if i had the header

#

i'd know if this was an actor or not

#

an actor is like

#

the 3d object in engine

#

like the character is an actor

#

an item in the game world is an actor

twin juniper
#

I know what is an actor

misty stirrup
#

a light is an actor etc

twin juniper
#

I'm asking what are you asking is an actor

misty stirrup
#

like

#

the uh

#

delete the actor

twin juniper
#

Anyway, it's the projectile and the gun we are talking about

#

they are both actors

misty stirrup
#

ok

#

how are you spawning the projectile

frank copper
#

an actor is not a 3d object in engine. is a spawned object in world

misty stirrup
#

make a blueprint instance, name it projectileBP set the gun to fire that

twin juniper
#

AProjectile* Projectile = GetWorld()->SpawnActor<AProjectile>(ProjectileClass, Origin, ShootDir.Rotation(), SpawnParams);

frank copper
#

spawnable

twin juniper
#

I'm spawning a BP instance of that

#

only spawning the projectile on the server

#

but replcating it

misty stirrup
#

spawn the projectile via blueprint ingame

#

or ineditor

#

i mean

twin juniper
#

that's too much to change

misty stirrup
#

no it's not make a cube that spawns it as a blueprint

#

just to test

twin juniper
#

Last thing I haven't tried is to not destroy the Projectile

#

once it hits something

misty stirrup
#

oh

twin juniper
#

but I'm destroying it after a sec

#

to let it replicate

misty stirrup
#

i mean like

#

yeah do that

#

lol

#

comment that out see what happens

#

maybe a second isnt enough due to onrep being weird or somethin

twin juniper
#

I mean I'm not simulating lag, and even if I were I wouldn't be simulating 1000ms of lag, but lets give that a go

#

nope

misty stirrup
#

okay now try spawning it as a blueprint

#

lol

twin juniper
#

the projectile is a BP

#

With a C++ class parent

misty stirrup
#

spawning it with a blueprint

#

that isnt the gun

#

like all through blueprint

frank copper
#

but you're trying to send back to the clients the projectile spawned by the server to spawn a sound at the impact location?

#

or what are you trying to do?

misty stirrup
#

okay like

#

he has a editanywhere variable

#

that can be called everywhere else

#

with no crash

#

but when he runs this onrep thing refrencing the variables

#

it crashes

#

im pretty sure it's because its all in c++, and its the wrong blueprint variable setting or whatever for onrep

twin juniper
#

crashed

misty stirrup
#

so it can't be called in c++

#

ok cool

#

PROGRESS

twin juniper
#

It's not related to that

#

That's some really weird shit going on there I'm almost sure

frank copper
#

if the variable is created in blueprint it can't be called in c++

twin juniper
#

It's not

misty stirrup
#

its not

#

its a c++ blueprint editable anywhere

twin juniper
#

That's an EditAnywhere variable

frank copper
#

oh ok

twin juniper
#

@frank copper It also works anywhere else

#

Like, I call that function on an OnHit function

#

works fine

#

I also have another class for LineTrace guns, in which I call that function from the client and it works just fine

#

Also in that class I'm calling it from an ONREP fuction and it doesn't crash

#

It also crashes when the only thing I'm doing is to check if the value is NULL or not

misty stirrup
#

what about right before the uhhh onrep function you set the defaultvariable to the newvariable i had you set up

twin juniper
#

if (DefaultImpactFX)
{
UE_LOG(LogTemp, Warning, TEXT("DefaultImpactFX is not null"));
//ImpactFX = DefaultImpactFX;
}

misty stirrup
#

lets be clear defaultimpactFX crashes whenever its refrenced

twin juniper
#

That shouldn't crash

misty stirrup
#

as we tried printing the name in UE_LOG

twin juniper
#

I deleted it

#

It like this variable doesn't even exist

#

when called from the OnRep function

#

I'll try doing the opposite

frank copper
#

did you set the UPROPERTY(Replicated) to it?

twin juniper
#

I'll check if it's null, then if it is I'll log it

#

No, it shouldnt be replicated

#

It's just few effects

misty stirrup
#

do it

twin juniper
#

Do you want me to send the code?

misty stirrup
#

set it to replicated

frank copper
#

oh, ok, but you're still using it in a replication code

twin juniper
#

@misty stirrup It's unrealted, these are local variables that crash the program

#

you can't replicate those anyway

misty stirrup
#

o

#

rip

twin juniper
#

Yeah, but there is no need to replicate them

frank copper
#

but what type does it have?

misty stirrup
#

yeah but maybe

#

it needs to be 'replicated' to exist for onrep

twin juniper
#

Hold on, I'll rexplain everything and share the code again

#

@misty stirrup It's not, I'm creating these variables on the PlayImpactEffects, so it gets called from OnRep it should create them

misty stirrup
#

what if uh

#

is playimpacteffects

#

the onrep?

twin juniper
#

No

#

You can't set a function to OnRep lol

misty stirrup
#

what do you mean you're creating these variables lol

twin juniper
#

Here is the PlayImpactEffects and GetSurfaceType code, but GetSurfaceType is unrealted since I commented it out for now

misty stirrup
#

post the full header in pastebin

twin juniper
#

@misty stirrup They are local variables

misty stirrup
#

how can they be local variables that are editable anywhere

#

what

twin juniper
#

forgive me for all the if checks, I shouldn't need them... but it's crashing so I tried

frank copper
#

if (DefaultImpactFX) this variable, where is it declared?

twin juniper
#

@misty stirrup read the code

#

in the header

frank copper
#

and how do you declare it?

twin juniper
#

Now. let me explain it further:

#

I've have few different gun classes

#

Two of them are the Projectile and Linetrace

misty stirrup
#

UPROPERTY(EditDefaultsOnly, Category = "Config|Effects|FX")

#

did we confirm if it was only one variable or is it all 3

twin juniper
#

In the LineTrace class, I call PlayImpactEffect for the client, and then replicate the effects via an OnRep function that LineTrace again and sends the HitResult to PlayImpacEffects

#

It doesn't crash, because there is no reason to

#

then in the Projectile class

#

I call PlayImpactEffects once the projectile hits something, and also once it hits something I change an OnRep value to replicate the impact effects for the clients

#

on that OnRep function I'm LineTracing to get the the HitResult, call PlayImpactEffects

frank copper
#

so this DefaultImpactFX it's sent to the clients

twin juniper
#

and pass it the HitResult

frank copper
#

you set a local variable

twin juniper
#

It only crashes from the OnRep function

#

@misty stirrup what do you mean?

frank copper
#

to this DefaultImpactFX and then you send it to the clients

twin juniper
#

@frank copper just a sec

misty stirrup
#

you have one in here that's set to editdefaultsonly

#

meaning its defaults can only be changed for blueprints

twin juniper
#

@misty stirrup That's my bad lol

#

but that's unrealted

#

unrealted

#

@frank copper now, take a look at this:

#

These IFs checks alone are crahsing the program

misty stirrup
#

yeah but you where calling that in a C++ if statement

frank copper
#

and what error message are you getting? what is the crash error?

twin juniper
#

[2018.04.15-05.57.19:948][ 59]LogWindows: Error: [Callstack] 0x000000000F666642 UE4Editor-MicroVoltsClone.dll!AGun::PlayImpactEffects() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\gun.cpp:144]
[2018.04.15-05.57.19:948][ 59]LogWindows: Error: [Callstack] 0x000000000F66D975 UE4Editor-MicroVoltsClone.dll!AProjectile::OnRep_Exploded() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\projectile.cpp:101]

#

@misty stirrup What do you mean?

misty stirrup
#

change it to editanywhere

twin juniper
#

I did, but that won't help me

frank copper
#

and the line in the crash error is this one? if(DefaultImpactFX) ?

twin juniper
#

No, these 3 IF checks all cause a crash

#

I could remove them

#

but then it will still crash

#

if I try to access these pointers

frank copper
#

first you cloud check against a nullptr

twin juniper
#

I am checking

frank copper
#

if(DefaultImpactFX != nullptr)

twin juniper
#

2018.04.15-05.57.19:948][ 59]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000450

#

I'm doing it

frank copper
#

second, i would set that property as Replicated

#

as i showed you above

#

just for the sake of it

#

you don't have anything to lose

twin juniper
#

Sure, but why is an IF check causing a crash then?

misty stirrup
#

it

#

just do it

#

lol

twin juniper
#

I can't

#

these are local variables

misty stirrup
#

if it crashes when

#

DefaultImpactFX != nullptr

twin juniper
#

They get created once the function runs

#

I shared my code

misty stirrup
#

how are they local if they're in the

#

header

#

is there something im missing here

#

like

twin juniper
#

@misty stirrup you didn't read it I guess

misty stirrup
#

DefaultImpactFX IS being called

#

in the header

#

right?

twin juniper
#

it's commented out

#

in my version

#

read it

#

.26 KB

void AGun::PlayImpactEffects(const FHitResult& Impact)
{  
    USoundBase* ImpactSound = nullptr;
    UParticleSystem* ImpactFX = nullptr;
    UMaterialInterface* BulletDecal = nullptr;

    if (ImpactSound)
    {
        UE_LOG(LogTemp, Warning, TEXT("DefaultImpactSound is not null"));
        ImpactSound = DefaultImpactSound;
    }
misty stirrup
#

those aren't the ones causing the crash though?

twin juniper
#

these 3 first IF checks are enough to crash it

misty stirrup
#

are

twin juniper
#

I'm not even touching the DefaultImpactSound/FX/Decal variables at this point

frank copper
#

if (ImpactSound) should be if(DefaultImpactSound != nullptr)

misty stirrup
#

lol

twin juniper
#

No, I need these ImpactSound, ImpactFX, BulletDecal vars

glacial pollen
#

I'm curious, are you destroying the bullet?

twin juniper
#

look at how my functions work

misty stirrup
#

he said he got rid of his destroying of the bullet earlier

#

and it still crashed

glacial pollen
#

kk

twin juniper
#

@glacial pollen Yeah, only a sec later to let it replicate, but I tried to not destroy it

frank copper
#

but you're checking if ImpactSound is valid even though 2 lines above you're declaring it as nullptr

misty stirrup
#

^

twin juniper
#

Right, I did it in purpose

#

it used to be

#

ImpactSound = DefaultImpactSound;l

#

that resulted in a crash

misty stirrup
#

okay just

#

comment everything out

#

even the = nullptr

#

stuff

twin juniper
#

@frank copper Hold on, I'll share with you the version in which I commented things out, thought it would be better without them

misty stirrup
#

and confirm like

misty stirrup
#

that it's the editanywhere crashing it

twin juniper
#

Take a look what's commented and what not

#

@frank copper oh, I forget... the first check should be if(DefaultImpactSound) and not if(ImpactSound)

#

didn't see that

frank copper
#

yes

twin juniper
#

yea, the other ones are ok though, just a typo 😃

glacial pollen
#

The commented out version does not crash right?

twin juniper
#

it does

glacial pollen
#

kk

frank copper
#

gun.cpp:144

twin juniper
#

These 3 if checks crash it, which doesn't make sense

frank copper
#

which one is line 144?

twin juniper
#

if (DefaultImpactFX)

frank copper
#

in gun.cpp?

glacial pollen
#

does ue4 use nullptr or NULL?

misty stirrup
#

eithre work

glacial pollen
#

kk

misty stirrup
#

ue4 has built in protectoin against nulls

frank copper
#

nullptr for pointers

misty stirrup
#

if you set it up

#

like

#

it's a macro you need to call

misty stirrup
#

which is why i keep fucking asking for the full header

twin juniper
#

How come it only crash from the Projectile OnRep?

#

Anywhere else it works just fine

#

And it's not like I'm even doing anything, I'm just running an if check... how could it make it crash

misty stirrup
#

because onrep is seeing it as a nullptr or its being derfrenced somehow

#

like

#

you should know this as a general rule

#

shit crashes when that happens

twin juniper
#

@misty stirrup Ok, but that's why I am checking if it's null or not

misty stirrup
#

yeah but it's likw

#

like

twin juniper
#

I've been programming for 7 years, I know that... there is nothing that should crash it

misty stirrup
#

the variable doesn't exist

#

in onrep man

#

like

glacial pollen
#

I'm with @twin juniper on this, a null check shouldn't crash

misty stirrup
#

what im saying is

twin juniper
#

2018.04.15-05.57.19:948][ 59]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000450

misty stirrup
#

the variable doesn't exist in wherever onrep is

#

okay but you've got

glacial pollen
#

What basically @misty stirrup is saying, is that for whatever reason, its doing a null check against something that for somereason isn't there

misty stirrup
#

yeah.

#

did you confirm

#

if it's actually

#

the local variable

#

or not

twin juniper
#

What do you mean? I shared the code

frank copper
#

so basically the only one that's crashing is DefaultImpactFX

glacial pollen
#

The ONLY reason I can guess this happens, if this function is running on another instance that did not create the variables

twin juniper
#

no

misty stirrup
#

oh

twin juniper
#

that's not what crashing

misty stirrup
#

what line

#

is it on

#

post the line

twin juniper
#

look at this

#

everything is commented out

#

but the IF checks

#

it still crashes

misty stirrup
#

@glacial pollen my idea is that he's spawning a bullet that's the c++ class and not a BP class with set variables

twin juniper
#

@glacial pollen The variables should be created once the function runs

misty stirrup
#

what line

#

is the e

#

error on

#

no

#

it shouldnt

#

the first 3 should be created when the actor is spawned

#

like

#

the 3

#

defaults

glacial pollen
#

Where are the three "default" variables declared?

misty stirrup
#

i thought r the ones crashing it

#

like

twin juniper
#

Header file

glacial pollen
#

in bp?

misty stirrup
#

comment out the local variables

twin juniper
#

I posted it too

misty stirrup
#

comment out the local variables

twin juniper
#

@misty stirrup If I comment it out, I need to remove the IF checks too... so ofcourse it won't crash

misty stirrup
#

do that

#

comment the whole thing out

#

try to print one of the default varaibles

twin juniper
#

the default variables are not the issue

#

I'm not even doing anything with them

glacial pollen
#

what?

misty stirrup
#

lol

twin juniper
#

@glacial pollen ?

frank copper
#

first of all, you are closing the comment paragraph wrong

misty stirrup
#

if it's the local variables

glacial pollen
#

If(default) = crash right?

frank copper
#

do it right

misty stirrup
#

why the fuck did you keep saying the if statements are crashing it

twin juniper
#

Yeah, I saw that now... I didn't compile it yet

#

just added it so you can see

misty stirrup
#

if it's not the default variables

#

im so lost now dude

frank copper
#

you are sending us confusing data. are you playing with our minds? =)))

glacial pollen
#

I want to see a SINGLE line, that crashes this. Everything else needs to go

twin juniper
#

It's the if checks

glacial pollen
#

I don't want to hear x3 again

misty stirrup
#

no

twin juniper
#

any one of them can crash it

frank copper
#

close the comment properly, recompile, and show us the entire output error

#

not only 2 lines

misty stirrup
#

stop saying it's the if checks

#

screenshoto the line

#

and output error

#

no more copy paste

#

i straight up don't believe you anymore

#

lol

#

you're saying 3 different things

#

you're saying its not the defaultVariable

#

you're saying its the localVariable

glacial pollen
#

@misty stirrup chill for a second

misty stirrup
#

now you're saying it is the top 3 if checks

#

which ARE the defaultVariables

#

im so lost man

twin juniper
#

@frank copper I showed the whole function, not 2 lines. The comment doesn't matter, I didn't compile and didn't notice it, I just added them to let you see what was commented out before. I showed you the Output error as well

#

You saw it all

glacial pollen
#

Please everyone just hold on a second

frank copper
#

no, close the comment paragraph, recompile it when you check against nullptr, and print screen the output error log

#

and show us that

twin juniper
#

@frank copper I showed you the output log when it was compiled and commented out

#

[2018.04.15-05.57.19:948][ 59]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000450
[2018.04.15-05.57.19:948][ 59]LogWindows: Error:
[2018.04.15-05.57.19:948][ 59]LogWindows: Error: [Callstack] 0x000000000F666642 UE4Editor-MicroVoltsClone.dll!AGun::PlayImpactEffects() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\gun.cpp:144]
[2018.04.15-05.57.19:948][ 59]LogWindows: Error: [Callstack] 0x000000000F66D975 UE4Editor-MicroVoltsClone.dll!AProjectile::OnRep_Exploded() [f:\epic games\projects\tpsgame\source\microvoltsclone\private\gun\projectile.cpp:101]

glacial pollen
#

@twin juniper Can you please remove everything but ONE of the three that causes the crash?

twin juniper
#

@glacial pollen They are all crashing it

glacial pollen
#

I know

#

I just want to see a A:B comparision
A: Should be everything removed (not commented) that produces an ok result
B: SHould be A, but add ONE line, to cause a crash

twin juniper
#

Sure, my PC crashed so hold om

glacial pollen
#

Alright thank you

thin stratus
#

Stupid question, but did he try to just debug run the game through VS?

twin juniper
#

didn't

thin stratus
#

To see where exactly it crashes and what variables are involved?

#

Then do that first

misty stirrup
#

UPROPERTY(EditAnywhere, ReplicatedUsing = OnRep_Foo

twin juniper
#

It crashes on the first IF check

misty stirrup
#

add ReplicatedUsing = OnRep_foo

twin juniper
#

but only when I call it from the OnRep

misty stirrup
#

i dont

#

care do it

#

please

#

thank you

twin juniper
#

@misty stirrup ?

misty stirrup
#

UPROPERTY(EditAnywhere, ReplicatedUsing = OnRep_Foo

#

add ReplicatedUsing = OnRep_Foo

#

to all of the editanywhere varaibles

twin juniper
#

What?

misty stirrup
#

tia

#

like

twin juniper
#

Why would I want to do that

misty stirrup
#

google-fu sensei says so

#

its also a random guess

thin stratus
#

I would be surprised if something crashes with an accessed non on an if

#

So please debug with VS

#

Check call stack and variables

twin juniper
#

Sure, but it does... if the IF checks are commented out it doesn't crash

misty stirrup
#

it isn't

#

the if checks

#

its the variables

#

we ran through this together an hour ago

#

lol

thin stratus
#

You can click through the callstack once the break hits

twin juniper
#

what variables?

misty stirrup
#

the blueprint editanywhere

#

are specficialyl the things crashing

twin juniper
#

That's enough to crash it

#

if (DefaultImpactSound)
{
UE_LOG(LogTemp, Warning, TEXT("DefaultImpactSound is not null"));
//ImpactSound = DefaultImpactSound;
}

misty stirrup
#

DefaultImpactSound is crashing it

#

not the if statement and defaultimpactsound

twin juniper
#

I'm not doing anything here

#

@thin stratus Sure, just a sec my PC had crashed