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.


  • Content Count

  • Joined

  • Last visited

  • Days Won


Dreatix last won the day on February 16 2014

Dreatix had the most liked content!

Community Reputation

4 Neutral

About Dreatix

  • Rank
  • Birthday 01/02/1995

Profile Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. if(!crouched){ // or if (crouched == false) if(Input.GetButton("Jump")){ //jump } } how can i disable "jump''
  2. Hi,i have crouch script,when i crouch i need to disable jumping function...Well i want to disable the jumping key: Input.GetButton("Jump"); I want nothing happens when i press "jump" button,and then when im standing i need to enable jump key.How can i disable and enable : Input.GetButton("Jump");. Sorry im stupid this time.
  3. you understand that there is local and remote player (two different instances). If you don't tell server to turn on fog on all connected players, nobody else will see it. Ok,thanks for that,ill keep that in mind
  4. The thing is i cannot rename player name,because alot of scripts are based on it . But talking about this thing,i dont know how smart you are,but making multiplayer i will meet alot problems.So can you please tell me what will happen with this,i cannot try because im in progress,but i cant leave things unfinished. Well i say again If i play cooperactive with my friend. And my friend gonna fall in water,is it gonna effect my screen too(because same names : Player),or not.
  5. Hey bibbobbib,can you please tell me how actualy multiplayer system work,i dont know 100% how it works,cause i never tried to make it (in current project).Anyway my player name is "Player" if i think logic if other player with name: "Player" gonna join...everything will go crazy.Like in the script system.... function OnTriggerEnter(thing: Collider){ if (thing.tag == "Player"){ Destroy(thing.gameObject); } } If one player gonna touch collider,then other gonna destroy?...Because they have same game project names: Player. Thats the same thing with this problem.Please understand me now Im making cooperactive game,so if i play game with my friend. And if my friend gonna get in water,is it gonna effect my screen (Scene) TOO...with that fog???
  6. If you dont uderstand me,please let me know,i will tell everything clearly,cause i realy neeeeed help
  7. Hi,i got water and under water i have trigger,when i fall into trigger audio plays and fog shows up.But when fog shows up it shows not just in my camera but in all scene,well i want to disable that,but i dont know how...I want to disable this because in multiplayer when other player gonna fall in water,and just because that player fall in water every player will gonna see fog on screen,so guys please help me to make that fog appears only in trigger or only in separate players camera (when he is in trigger). Hope you understand me Here the script: I DONT WANT THAT FOG EFFECTS ALL SCENE,BUT JUST PLAYERS CAMERA! public var uFogColor = Color(0.05, 0.36, 0.58, 1); // underwater fog public var uFogDens: float = 0.05; // underwater fog intensity // save current settings private var dFogColor: Color; private var dFogDens: float; private var dFogEn: boolean; static var inWater = false; // read this in the movement script to control the player speed public var waterLevel: float; private var underWater = false; private var lastUWater = false; function Update(){ var cam = Camera.main; underWater = inWater && cam.transform.position.y < waterLevel; if (underWater != lastUWater){ // only change settings when underWater changed lastUWater = underWater; if (underWater){ dFogColor = RenderSettings.fogColor; // save the current settings dFogDens = RenderSettings.fogDensity; dFogEn = RenderSettings.fog; RenderSettings.fog = true; // turn fog on... RenderSettings.fogDensity = uFogDens; // with the underwater settings RenderSettings.fogColor = uFogColor; cam.clearFlags = CameraClearFlags.SolidColor; // sky vanishes in the fog cam.backgroundColor = uFogColor; } else { RenderSettings.fog = dFogEn; // restore original settings RenderSettings.fogDensity = dFogDens; RenderSettings.fogColor = dFogColor; cam.clearFlags = CameraClearFlags.Skybox; } } } function OnTriggerEnter(col: Collider){ if (col.tag == "Player"){ waterLevel = col.bounds.max.y; inWater = true; } } function OnTriggerExit(col: Collider){ if (col.tag == "Player"){ inWater = false; } }
  8. Hi,i want my player destroys when he touches Line Randerer (When touches the Line randerer (laser) i Die). I dont know how to do this...cause i cant add mesh collider or rigibody or any components to prefab where is line randerer,because its gonna screw up my prefab(laser). It will be a separate script,added to prefab or something? Dont have ANY idea. Please help me.
  9. Damn.....its not simply for me to understand ,could you please give me some examples?
  10. Hi guys,probably everyone knows what is this bug,basically if you crouch under object and then stand up,you get through that object and you stuck in it.Well i tried my mothods to fix this bug,what i did is: I make separate script,i make empty gameobject attached to player,i make box collider with trigger (In empty gameobject) And attach script to empty gameobject.Basically script works like: when i stand up it activates box trigger and then activates box collider and so on.......Script was damn buggy.So now i just need some different methods to fix this problem! I know there are thousands of these methods,so can you please help me?!?! My Crouch Script: var isCrouched : boolean = false; function Update () { if(Input.GetKey("c")) //is the crouch button being held? { if(!isCrouched) crouch(); } else { if(isCrouched) stand(); } } function crouch() { var controller : CharacterController = GetComponent(CharacterController); controller.height /= 2; isCrouched = true; } function stand() { var controller : CharacterController = GetComponent(CharacterController); //the "fpv" was a tag added to First Person Controller so it can be modified var fpvController = gameObject.FindWithTag("fpv"); fpvController.transform.position.y += controller.height/2; controller.height *= 2; isCrouched = false; }
  11. "fpv" ir tag spēlētājam,tas nav GO,scripts kā scripts,vienkārši jārediģē skripts un japasaka spelētāja tags,nevar būt nekas vienkāršāks kā pateikt skriptam spēlētāja tag. Nu kaapeec tu man te mulkiibas staasti, taa kaa es buutu kaads iesaaceejs un nezinaatu kas it tagi. Ja tu saproti kas ir rakstiits shai liinijaa: var fpvController = gameObject.FindWithTag("fpv"); tad tev ir jaabuut skaidram ka "fpvController" tu definee kaa gameObject. Labi es tev uzrakstiishu TIIRU skriptu un optimizeetu, balstoties uz taam liinijaam ko tu uzrakstiji. Es domāju ka tu runā par empty game object kas ir ir grupēts ar player un sastāv ar visiem tiem saturiem,un tad empty gameobjects ar tagu player kuru atrod caur skriptu.Tas jau ir loģiski ka "fpvController" ir definēts kā gameobjects,man vnk ir deaktivizēts cc meshs.
  12. "fpv" ir tag spēlētājam,tas nav GO,scripts kā scripts,vienkārši jārediģē skripts un japasaka spelētāja tags,nevar būt nekas vienkāršāks kā pateikt skriptam spēlētāja tag.
  13. Nezinu kāpēc tā daru,zinu ka tas ko teici ir daudz ātrāks un izdevīgāks veids,bet man tāds ieradums "fpv" ir spēlētāja nosaukums,ja tavu spēlētāju sauc "example" tad raksti "fpv" vietā example...gameobject ir spēlētājs...redzi: gameObject.FindWithTag("Player"); scripts atrod GO kam tag ir "Player",kautvai default tag:gameObject.FindWithTag("Default"); Runājot par skriptu ir vel viena problēma,jeb lieta Skripts darbojās perfekti,bet ir viens bug,ķipa notupjoties zem objekta un pēc tam pieceļoties tu izej cauri objektam un nevari pakustēties,es domāju ka tu jau zini ETeeski tutoriālos ka tur viņš to problēmu rāda kā salabot,bet man ir cits skripts un es ne sūda nezinu kā to salabot Vari moš palīdzēt man?
  • Create New...