This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Maggedelle

Networkview.RPC ..

Question

Hey guys,

so im creating this online game.

Today i ran into a problem, creating a RPC.

 

i got this: 

Please login or register to see this code. Please login or register to see this code.

The problem is that you cant send a "Collider" with a RPC. RPC's only support: integer, float, string, NetworkPlayer, NetworkViewID, Vector3 and Quaternion.

So how would i send this RPC?

 

 

Share this post


Link to post
Share on other sites

11 answers to this question

  • 0

u cant send anything other as parameter than int, float, string NetworkPlayer, NetworkViewID, Vector3 and Quaternion. You are trying to send a collider.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Themars,

i know. I allready said tha, if you read the post :)

Im asking how i should send the information, without using a collider?

Share this post


Link to post
Share on other sites
  • 0

check local and then send the rpc directly so you call this function actually:

Please login or register to see this code.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

thx for the help,call me a nab. But don't understand what you mean?

Share this post


Link to post
Share on other sites
  • 0

check this local

Please login or register to see this code.

and then

call the rpc like i did in the code

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

I appriciate your  help!

Now my codes look like this: 

Please login or register to see this code.

And i dont see how this makes any diffrence? + i get the same error

Share this post


Link to post
Share on other sites
  • 0

Damaging players through the network shouldn't be done that way, anyway.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

 

m8 you should call the rpc directly on the collider!!!111

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Well arent you helpful, captain obvious :3

 

Honestly, what I would do is apply the hit to the "object" holding the collider script which I believe hand on hand will get you results. Plus the staffing on here is not credible except for OMA, try Brackeys for way better support next time, probably some kiddos are going to get mad for my brutal honesty and remove me from the forums so have good day, Maggedelle!

Edited by Demøn

Share this post


Link to post
Share on other sites
  • 0

Uh, what does staffing have to do with the topic? You're not helping either. And yes, you are actually right that we can't help every single person on this forum learn how to walk and code things correctly.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

You can't learn if you can't get help or a tip, or something that could help just a little bit.

Well, you can learn without help, but it would be a lot harder, and yes maybe you can't help every single person on the forum, but you can give them a hint or a tip on how to possibly solve something. And then they can find out the rest.

 

There's different ways to code things correctly, one might be harder on the performance than the other way, and one might be better on performance but worse on other things. (There is pretty much always pros and cons in every solution)

 

And i mean not just you, but everyone(That might have a idea) could atleast give something like a little hint/tip or any kind of thing that could help a little bit. And everyone has been a complete beginner where you don't know how to code or where/how to start.

 

 

Google is a huge help too, but it is not always easy to find things when you can't find the information you want, or it isn't there, or you don't know what to search.

 

I'm just saying, atleast give a hint or a tip, and they can figure the rest, and is a great way to learn too. Then they learn to research on they own, and use the hint or tip to get to what they want.

 

PS. I know you can't give a hint or a tip, or any kind of help if you are not sure about a solution.

 

______________________________________________________________________________________________________________________________________________________________________________________

@Maggedelle

 

There's some information about how to use RPC on youtube, you can search on google too.

 

Anyway here's something that might help on how to use rpc Please login or register to see this link.

oh and i have read you post, and you say that you can't use collider for the rpc thing, but you can try youtube, there are some videos on damaging player

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now