Jump to content
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
Sign in to follow this  
EchtPeter

Prefab error

Question

Hi O.M.A.

I have downloaded your fps kit. It's awesome but there is one problem :( .

I create a new empty Gameobject and I took the Player and the GUI in it. I place this in a prefab and

save this. The next day I noticed that the GUI on the screen isn't here.

I wanted to create a new Scene with the player and so I can't. Please tell me how i can fix it.

Share this post


Link to post
Share on other sites

60 answers to this question

Recommended Posts

  • 0

if i understand you right - try to put player and GUI in separate prefabs. But i still can't understand how you lost your GUI if it was in the same prefab with player.

Share this post


Link to post
Share on other sites

  • 0
Please login or register to see this quote.

you get error or GUI disappear(you didn't wrote about errors in first post) ? If you get error it means that you must assign(connect) all GUI elements to scripts inside Inspector.

Share this post


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

in last post you mentioned that you getting an error(-s), but now you writing that you don't get errors... could you be more clear?

how long you are learning unity engine? I'm asking this, because problem is not connected with this project...

P.s show me some screens, or video of your problem...

Share this post


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

=)) and now i must hack your PC, to see that picture???

upload your screens as attachments to your post, or somewhere on web (for examplePlease login or register to see this link. ).

Share this post


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

at first you must fix all errors. Drag and drop "KickBack" from Hierarchy(under GUI) -> to RecoilMod in Inspector. You could also show me screens from GUI...

Share this post


Link to post
Share on other sites
  • 0

show me some screens from GUI (in hierarchy window) - i need to see positions(x,y,z).

and screen of "PlayerWeapons" (also from Hierarchy).

Share this post


Link to post
Share on other sites
  • 0

Hi

I have another "error".

I have made all the hitPoints of the Zombie to Static var but now I can shoot the Zombie 100 times and they won't be death what should I do ??

Share this post


Link to post
Share on other sites
  • 0

error in editor? or you simply can't kill enemies???

at first explain me - why hitPoints must be Static???

when you hit enemy = you send a message to add damage (from your "weapon script" to "enemy damage" script). You can change - (how many damage enemies will receive) in your weapon script.

Share this post


Link to post
Share on other sites
  • 0

It's a simple I can't kill enemys.

And I need a Static because a another script said that when one Zombie is dead the script should load a new Level

Share this post


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

still can't understand why you need static "hitPoins" to do that?

show me your script and i will help you...

Share this post


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

this must be full script (looks like a part of him)? As i understand it's just like a "manager" script, or am i wrong? give me some info too - what happens in other scripts (which are connected to this event).

Share this post


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

you just need to understand how all works (all functions, classes, strings, time, raycast, and so on) . And ofcourse write your own scripts (a lot). I understand, that at beginning it's very hard, but after every script you will know more and more. Don't waste your time by only modifying scripts - try to write your own from nothing...

and if enemy dies, you can send message to this script - by calling for function:

for example you can send message to game object where you added this script ( sending from "enemydanage").

It is really easy:

Please login or register to see this link.

Please login or register to see this code.

in other script (which will receive this message):

Please login or register to see this code.

It will work, if you don't use enemy spawning scripts.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...