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.

OcularCash

ADG
  • Content count

    3,698
  • Joined

  • Last visited

  • Days Won

    109

OcularCash last won the day on January 10

OcularCash had the most liked content!

Community Reputation

953 Excellent

About OcularCash

  • Rank
    Team Member
  • Birthday 04/29/1985

Profile Information

  • Gender
    Not Telling
  • Location:
    Springfield Missouri USA
  • Interests
    Javascript, Java, C#, C++, PHP, 3d Modeling, Foley Recording, Photography

Contact Methods

  1. Weapon Wheel (GUI Weapon Selection) *Update*

    Topic updated with the newest version
  2. Help To move Forward of the player direction

    It's no problem. Just remember, if you ever want to transform a vector into local space, whether it's a point in space, direction or rotation, refer to the transform methods and you will find them there
  3. Help To move Forward of the player direction

    No, in your first script. Change TempRigidbody.velocity = movementDir to TempRigidbody.velocity = transform.TransformDirection(movementDir);
  4. Help To move Forward of the player direction

    transform.TransformDirection(direction);
  5. Weapon Wheel (GUI Weapon Selection) *Update*

    I'll have to find it later if I even still have it. It used to be in this topic but when the forum was hacked awhile back, that's one of the things that was lost
  6. Need help making Runescape's Combat system (C#)

    In js I would do: function Update() { if(!attacking) Attack(target); } function Attack(target : Enemy) { attacking = true; while(target.health > 0) { Attack(); while(animation.IsPlaying(attackAnim)) { yield; } attacking = false; } which basically the exactly same thing just yields until the attack animation is finished instead of time.
  7. Weapon Wheel (GUI Weapon Selection) *Update*

    The problem with this is that it's old so it uses the old GUI system (higher draw count). But all you do is drop it on a scene object and fill in the variables
  8. Weapon Wheel (GUI Weapon Selection) *Update*

    @kshitiz621never left. What's up?
  9. Shoot ray from the object's next frame position?

    In a blank scene, yes you can make your own controller like that but your going to have some severe issues once you have a full scene and simple raycasts are no longer gonna cut it. That's why I mentioned character controller and rigidbodies bc in order to make your own, your going to have to build an entirely new physics response library, not just a raycast
  10. Read/Write From .txt file

    Here is the save load script I wrote for Delirious Devon. This is not meant to be dragged into your project, it's just for you to see how it's done, that's it. public var sceneData : SceneData[]; public var currentPath : String; class SceneData { var coins : String = ""; var bruteberries : String = ""; var cloakanuts : String = ""; var chests : String = ""; var costumes : String = ""; } public var coins : int; private var health : float = 100; private var invisibility : float = 100; private var sceneCount : int = 2; private var t : int; function NewGame() { coins = 0; health = 100.0; invisibility = 100.0; sceneData = new SceneData[sceneCount]; for(var i = 0; i < sceneCount; i++) sceneData[i] = new SceneData(); currentPath = Application.dataPath + "/Saves/GameSave.txt"; SaveGame(); } function LoadGame(path : String) { currentPath = path; sceneData = new SceneData[sceneCount]; var line : String; var sr : StreamReader = new StreamReader(currentPath); line = sr.ReadLine(); if(line != null) { coins = parseInt(line.Split(" "[0])[1]); health = parseFloat(sr.ReadLine().Split(" "[0])[1]); if(health > 100.0) health = 100.0; invisibility = parseFloat(sr.ReadLine().Split(" "[0])[1]); if(invisibility > 100.0) invisibility = 100.0; line = sr.ReadLine(); var currentScene : int = 0; while(line != null) { sceneData[currentScene] = new SceneData(); var splitLine : String[]; splitLine = sr.ReadLine().Split(" "[0]); if(splitLine.Length > 1) { sceneData[currentScene].coins = splitLine[1]; } splitLine = sr.ReadLine().Split(" "[0]); if(splitLine.Length > 1) { sceneData[currentScene].bruteberries = splitLine[1]; } splitLine = sr.ReadLine().Split(" "[0]); if(splitLine.Length > 1) { sceneData[currentScene].cloakanuts = splitLine[1]; } splitLine = sr.ReadLine().Split(" "[0]); if(splitLine.Length > 1) { sceneData[currentScene].chests = splitLine[1]; } splitLine = sr.ReadLine().Split(" "[0]); if(splitLine.Length > 1) { sceneData[currentScene].costumes = splitLine[1]; } line = sr.ReadLine(); currentScene++; } } sr.Close(); } function SaveGame(index : String) { var sr = File.CreateText(currentPath); sr.WriteLine("Coins: " + coins.ToString()); sr.WriteLine("Health: " + health.ToString()); sr.WriteLine("Invisibility: " + invisibility.ToString()); for(var i = 0; i < sceneData.Length; i++) { sr.WriteLine(""); sr.WriteLine("CoinObjects: " + sceneData[i].coins); sr.WriteLine("BruteberryObjects: " + sceneData[i].bruteberries); sr.WriteLine("CloakanutObjects: " + sceneData[i].cloakanuts); sr.WriteLine("ChestObjects: " + sceneData[i].chests); sr.WriteLine("Costumes: " + sceneData[i].costumes); } sr.Close(); } function SaveGame() { var sr = File.CreateText(currentPath); sr.WriteLine("Coins: " + coins.ToString()); sr.WriteLine("Health: " + health.ToString()); sr.WriteLine("Invisibility: " + invisibility.ToString()); for(var i = 0; i < sceneData.Length; i++) { sceneData[i] = new SceneData(); sr.WriteLine(""); sr.WriteLine("CoinObjects: " + sceneData[i].coins); sr.WriteLine("BruteberryObjects: " + sceneData[i].bruteberries); sr.WriteLine("CloakanutObjects: " + sceneData[i].cloakanuts); sr.WriteLine("ChestObjects: " + sceneData[i].chests); sr.WriteLine("Costumes:" + sceneData[i].costumes); } sr.Close(); } function GetStats(){return [coins, health, invisibility];} function SetStats(stats : float[]) { coins = stats[0]; health = stats[1]; invisibility = stats[2]; } Scenedata strings are just lists of 0's and 1's that are represented as booleans. 1 representing has not been picked up in the scene, 0 representing that it has been. And this is what the save file looks like: Coins: 0 Health: 100 Invisibility: 100 CoinObjects: 1111111111111111111111111111111111111111111111111 BruteberryObjects: 1111 CloakanutObjects: 1111111111111111 ChestObjects: Costumes: 1111 CoinObjects: BruteberryObjects: CloakanutObjects: ChestObjects: Costumes:
  11. How to convert .max files into .fbx ?

    Before ppl start posting like crazy to this topic, it's almost 3 years old, I'm sure he's gotten it working since then
  12. Shoot ray from the object's next frame position?

    If you are using a character controller, transform.position "IS" the next position after you call controller.move. So you can literally say: //save your position var pos = transform.position; //move the controller to the next position controller.Move(controller.velocity); var nextPosition = transform.position; //reset the transforms position transform.position = pos; as for a rigidbody controller tho, there is no way you can predict where the character is going to be until the next frame because it has to wait for the physics loop. Character controllers have immediate physics that allows physics to be done on the fly.
  13. Climbing

    Yours works fine, but clicking on his says "Access is not available for your account". edit: thinking about it, it may be bc I'm clicking on it on my phone and maybe iPhone can't download/view an MP4
  14. Climbing

    I tried clicking on your link and sent me to a restricted access page.. which is kinda weird because I'm a team member, I have no restricted access. So I take it your having a relativity issue. The problem with a climbing animation to actually climb instead of animate is just that, it moves the mesh instead of the controller. in normal circumstances you would code the controller to move and make the climbing animation not move its hips (so the character doesn't move up and over, it stays where it's at and the controller moves it by code). The only way I could possibly think of to use 99% strictly animation is to animate the mesh, then after the animation, say transform.position = hips.position - (Vector3.down * offset) but finding the perfect offset would be a pain. If you want, take a look at the parkour example project I have in the downloads section. It plays the animation in one spot and moves the controller to where it needs to be. It's in js but should be pretty easy to understand
  15. Grass by blender for unity ?

    If your using unity terrain, just import it to the terrain and adjust the settings. If not, you'll need a shader that does it for you. All the shader has to do is move the vertices based on height from the lowest vertices. As for a shader like that, your probably on your own making it
×