vxv
Junior vMember
Posts: 31
|
Post by vxv on Jul 27, 2018 22:05:05 GMT
I wil watch what you wrote me, thank you!!
I am still trying to find the correct path to the scripts that are on the character Can you please correct this example for I understand the path in the future please ?
namespace Invector.vCharacterController { public class Shore_Trigger : MonoBehaviour { public GameObject swim;
void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Shore")) { otherObject.GetComponent<????????>().enabled; ...........
???? I tried many but no success ... I tried swim as component and get the compoentn with vactions.vswimming but doesnt work I am pretty bumped on understanding the correct order to enable/disable a component in the character gameobject :(
|
|
|
Post by Invector on Jul 27, 2018 22:10:49 GMT
First, tell me exactly what you want to do... why you're creating this script?
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Jul 27, 2018 22:50:38 GMT
I am playing with it to disable the swimming component when player hits a trigger on objects with "Shore". It will help me do some more stuff in the begining if I will need it, this is why I ask for a guidance on how to reffer the swimming component from another object. I am not great of following namespaces and my coding abilities just upgraded last 2 weeks Anyway, I understood what you did I will implement tommorow and test, thank you! Doing something on the actual player is more direct atm and my approach above was with ECS approach in mind, or maybe because I need a good sleep .
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Jul 28, 2018 11:04:53 GMT
I found how to set it up but I am on the ShooterMelee controller. I think I chose correct: I dragged my character in the gameobject area as you can ssee in the picture. But I have errors as in the picture. why is that ? can you try the shooter template + shootermelee controller for me pleaase ? myprintscreen.com/s/vaef/2e6b0eb28a
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Jul 28, 2018 21:18:16 GMT
it seems it does not like a script in the armature parts namespace Invector.vCharacterController { using vEventSystems; [vClassHeader("DAMAGE RECEIVER", "You can add damage multiplier for example causing twice damage on Headshots", openClose = false)] public partial class vDamageReceiver : vMonoBehaviour what should I modify becasue I see the script does some nice stuff and I wouldn't delete it thank you!
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Jul 28, 2018 21:31:13 GMT
I found that the refference of this class (public partial class vDamageReceiver)
is in 2 places: - shooter > scripts > shooter - basic locomotion > scripts > ragdoll
so the compiler does not know where to choose it from I think, should I rename one ? delete one ?
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Jul 30, 2018 14:53:01 GMT
Any ideas on this error please ?
|
|
|
Post by Invector on Jul 30, 2018 18:26:13 GMT
I'm still confused about what you want to do... but if you want to disable the swimming component, you can do it using a vSimpleTrigger and events. No need to code anything
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Aug 1, 2018 17:49:11 GMT
I tried replicate what you showed me. You can see in my picture I did it the correct way. I have the errors as in the picture above: myprintscreen.com/s/1532812641.00553550.pngHere you can see why: myprintscreen.com/s/vdai/98c43503beHow can I repair it ? I think that this keeps my character do what you showed me to. -------- v2 - Regarding disabling a component in an object, I got your point, I wont code if unnecessary, but I want to understand it better please. So, I do not have any component disable parameter in the context menu for any script and I could only did this: myprintscreen.com/s/vdcb/3bd2e3facaThis was my initial idea: to enter a trigger of a slope object, disable the player's swimming and make the character put his hands on the object and wait for me to press up to climb.
|
|
|
Post by Invector on Aug 1, 2018 19:47:09 GMT
Right... ok so first your character prefab is outdated, we rename the vCollisionMessage to vDamageReceiver so make sure to replace the component for each ragdoll bodypart.
Then about the switch from swimming to climb you can do like I told in the last page, it's really simple but entering a specific animation and creating an extra input to only then start climbing would require a little more effort... you can do pretty much all using Events and small scripts
|
|
vxv
Junior vMember
Posts: 31
|
Post by vxv on Aug 2, 2018 0:41:52 GMT
I deleted all the vColission mesages some hours ago and errors dissapeared. Now I should add the vDamageReceiver so that I would have messages on being hit ? Still I wasnt abble to make it not glitchy and I made a video. Here it is: files.fm/u/p9tb8uh7The character is sticking to the border wich is setup as freeclimb tag. Ieven tried to give that border a bigger height but it wont work.Is it really necessary for an animation if the character sticks to the wall allready ?
|
|