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.

jolo309

Premium Member
  • Content count

    214
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by jolo309

  1. Climbing

    You should move the parent, not the child. If you only move the child then it will do what you're experiencing. Play the animation on the child like you do now, but move the parent instead of the child
  2. Check objects position

    What you did were breaking out of the foreach allowed positions loop when the object wasn't at one of the allowed positions. Here's an explanation Let's say we have 3 spheres, and 3 allowed positions: 1st sphere loops through the allowed positions: - 1st allowed position failed, because the sphere wasn't at that position. oh now it breaks the loop. - So that means already at the first test, it breaks out of the allowed position loop and won't compare with the other allowed positions. 2nd sphere loops through the allowed position: - 1st allowed position passed, it continues the loop even though it found a match. - 2nd allowed position failed, it breaks the loop and sets the test to false. 3rd sphere loops through the allowed position: - 1st allowed position passed, it continues the loop even though it found a match. - 2nd allowed position failed, it breaks the loop and sets the test to false. so it will always return false with the code you posted. Well not always, the only way it can return true is if the 3rd sphere's position matches the last allowed position. That's the only time it will be true Made a few adjustments, now it should work public bool checkSequence() { bool test = false; foreach (Transform t in spheres) { test = false; foreach (Vector3 p in pos) { if (p == t.position) { test = true; break; } } if (!test) { break; } } return test; } Now with the new code, let's say we have 3 spheres, and 3 allowed positions: 1st sphere loops through the allowed positions: - 1st allowed position failed, because the sphere wasn't at that position. - 2nd allowed position passed. Breaks out of the loop. 2nd sphere loops through the allowed position: - 1st allowed position passed. Breaks out of the loop. 3rd sphere loops through the allowed position: - 1st allowed position failed, because the sphere wasn't at that position. - 2nd allowed position passed. Breaks out of the loop. The method returns true Here's another where it will fail: 1st sphere loops through the allowed positions: - 1st allowed position failed, because the sphere wasn't at that position. - 2nd allowed position passed. Breaks out of the loop. 2nd sphere loops through the allowed position: - 1st allowed position failed, because the sphere wasn't at that position. - 2nd allowed position failed, because the sphere wasn't at that position. - 3rd allowed position failed, because the sphere wasn't at that position. - This sphere wasn't in any of the allowed positions, so now it breaks out of the sphere loop too and the function returns false
  3. Check objects position

    Do you want to check if an object's position in the object array matches one of the vectors in the vector3 array? Like so: is object[0] position == vector3[0] is object[0] position == vector3[1] is object[0] position == vector3[2] is object[1] position == vector3[0] is object[1] position == vector3[1] is object[1] position == vector3[2] etc... Or is it more like: is object[0] position == vector3[0] is object[1] position == vector3[1] is object[2] position == vector3[2] etc... Or what do you mean?
  4. Not any that I know of
  5. Hi there! I am making a little fun game and i made a simple shoot and reload script for the game, so i wanted to share the script INSTRUCTIONS: 1). Create a C# script and call it PlayerShoot. 2). Remove everything in the script, and copy one of the scripts below(There's a Rigidbody and Raycast version) and paste it in the C# script you made. 3). Attach the script to the player. Rigidbody Version: Raycast Version: I have tested it, and it works fine You can attach the PlayerShoot script to the player. Remember the projectile has to have a rigidbody component or else it will throw a error(This is only if you use the Rigidbody version). If you have questions then ask EDIT1: I made some improvements. Added support for shoot and reload animation. Added a GUI label to show the ammo on the top left corner. Now you can't shoot while reloading. I think there's more but i can't remember. And you don't have to use animations, it's okay if you just leave it empty, btw the GameObject variable named "weapon" is only for the animations. So if you want to use animations you have to attach the GameObject that has the shoot and reload animation to the weapon variable ^^ Hope you enjoy, and you can always come with suggestions, like on what i could add more. EDIT2: Added a raycast version now Rigidbody Version Damage: 1). Make a seperate script and attach it to the projectile. 2). Open the script and do a OnCollisionEnter and check if the collision is the enemy or something and if it is then substract they health or anything else. Raycast Version Damage: 1). Find the DoDamage method(function) in script. 2). Replace what's in the DoDamage to what you like.
  6. The weapon script uses the legacy version of the animation system How to use animations: Make sure your weapon's animations uses the legacy animation system Attach the script to a weapon, and find the animations section. Where it says Fire Animation in the inspector, put in the name of the fire animation clip Do the same for the other animations. Shooting: The shooting uses the center of the screen, so you don't have to set any point to where the bullets go. I made the script quite a while ago, so there's a lot that could be improved, pretty much everything. Example. The way I made recoil in the script is by using the screen, which is an awful way of doing it because some may have a big screen, and they will have less recoil than those with a small screen.
  7. Tank head rotate angle ?

    Try changing var rotation = Quaternion.LookRotation(target.position - transform.position); to var rotation = -Quaternion.LookRotation(target.position - transform.position); or var rotation = Quaternion.LookRotation(transform.position - target.position); Both ways should result in same behaviour
  8. 2.5d Ping Pong

    New update: Significant improvement to the controls, which means no more slidey or delayed controls Bug fixes Optimizations Download and webgl links is in the first post
  9. 2.5d Ping Pong

    Hello, I have made a simple 2.5d Ping Pong game, and it was pretty fun to make. You can play with your friend locally, using the same keyboard. The one who has the most points when the timer ends, will win. Feedback is appreciated Features: Player vs computer - Play versus the computer(you can choose easy, medium, hard difficulties). It is not really difficult, even on hard Local 2 player - Play with a friend using the same keyboard. Player 1 uses WASD, and player 2 uses the arrow keys High speed effects - When a ball enters high speed mode, it will have impact effects when hitting the pads, and have an effect surrounding the ball. The camera will shake upon impact, which can be disabled Simple anti stuck - The ball resets when taking more than 4 seconds before it gets hit Powerups and powerdowns - You can disable it if you don't want play with powerups and powerdowns Screenshots: A video showing the gameplay. The fire trail in the video has been shortened in the downloadable version: Controls: WS - Player 1 controls Arrow keys up/down - Player 2 controls P - Pause game Download: Ping Pong 2.5D [Public Release v1.0] Ping Pong 2.5D [Public Release v1.1] Ping Pong 2.5D [Public Release v1.2] Ping Pong 2.5D [Public Release v1.3] WebGL: Newgrounds - v1.3 If you find any bugs please post them, and I'll fix them asap.
  10. 2.5d Ping Pong

    New update: Powerups and powerdowns | Right now there is 3 powerups and 1 powerdown. Size up, 1HP shield, 2HP Shield, Controls inverter Main menu changes A few bug fixes Powerups and powerdowns spawns randomly. If the ball hits a powerup or powerdown, then the player that hit the ball the most recent gets it. Download is in the first post I have also uploaded the new version to newgrounds, so you won't have to download it, plus the game got through Judgement
  11. 2.5d Ping Pong

    I have submitted the game to newgrounds, so you can play it without having to download anything. Link to the game The game is "Under judgement", so I'm not sure if it is going to be blammed, it depends on the ratings, but you can try it out. Oh, and one more thing. It doesn't run as smooth as it does in the downloaded version, but it is still playable, I have no problem with it
  12. 2.5d Ping Pong

    Alright, here's the new update. Took a bit longer than expected, as I wanted the hard difficulty to be harder than easy and medium, without having to increase the speed of the AI. Every difficulty has the same speed, but the hard, and medium difficulty is a bit more human like, and tries to predict somewhat where the ball ends up. [FIXED] When you lost, it would print "You won!" instead of "You lost!" when you lost. [ADDED] A pause menu. [AI] Improvements for hard, and medium difficulty. [FIXED] When the ball is preparing to shoot, the timer didn't stop. Next update I will focus on improving the gameplay a bit, and that update might be the last, not sure. This game was just something I wanted to make, for anyone that wants to have something to play with a friend or something when bored, and because I wanted to see how it would be to make something simple, and nothing overwhelming. I will probably share this on something like kongregate too, and I might even make an android version, but I'm not sure yet. Download: Ping Pong 2.5D [Public Release v1.1]
  13. 2.5d Ping Pong

    Thanks, will try to think of something to make it more interesting
  14. HI

    OnTriggerEnter requires an argument, that's why when you try to call it without any arguments it is throwing an error. Anyway, you shouldn't be calling OnTriggerEnter, because it gets called automatically when something enters the trigger. If you just want to explode the claymore, what you could do is create a new method and name it something like "Explode", and then move everything that is responsible for the claymore exploding, into the new method Then you can call that method anywhere you want to explode the claymore
  15. 2.5d Ping Pong

    I will upload a new update, soon. I'll see if I can finish it today, and if not, then tomorrow. The new update will have a few fixes, and additions. [FIXED] When you lost, it would print "You won!" instead of "You lost!" when you lost. [ADDED] A pause menu. [AI] Improvements for hard difficulty, without speeding up the AI. [FIXED] When the ball is preparing to shoot, the timer didn't stop. Please give me some feedback, I would really appreciate it
  16. Hello, a bit over an hour ago, I signed up on codefights, and I got to a thing where you have to get the century from year. Which was pretty easy, and there's soo many ways to do it. Anyway, after I came up with a solution, I wanted to see how other people solved it, and the most interesting one I saw were return --year / 100 + 1 How does this work? I know -------------------------------- year = 1800 year / 100 + 1 = 19 expected = 18 -------------------------------- year = 1801 year / 100 + 1 = 19 expected = 19 -------------------------------- but if I add the -- before year, then it will output -------------------------------- year = 1800 --year / 100 + 1 = 18 expected = 18 -------------------------------- year = 1824 --year / 100 + 1 = 19 expected = 19 -------------------------------- How come after -- has been added before year, it all gets decremented kind of like, if year % 100 == 0 then decrement year / 100 + 1. Am I completely off? This just confuses me a bit, and it just makes me nuts, not knowing how it works Please help me to make me understand this, would really appreciate it I have seen it in for loops too(Not often though, only seen it being used in for loops 2 times), like so for(int i = 5; i > 0; --i) { // Blah blah } I have seen it with ++i too
  17. Steam Summer Sales

    Yeah I haven't played half of the games in my library :-D I usually just buy games on sale, especially when the summer sales is here, thinking I'm going to play them but there's a lot of them I haven't even played I have 298 games in my library
  18. Topdown wave survival game

    Hello, I have always wanted to make a topdown wave survival game, so here I am making one Here is some of the planned features that will be in the game Build system - a simple build system, so you can place walls and other stuff to defend yourself Shops - weapons, and build shop Weapon system - You can only equip 2 at a time, a primary and a secondary(Small weapons such as, SMGs, and pistols) Procedural generated waves - Generates a wave based on the difficulty, or settings you set. EDIT: VIDEOS Current features(v1.4): Procedural generated waves (You can configure settings yourself if wanted) Build shop Weapon shop Power system (build powered defenses such as turrets, or if you just want to put up some lights, then you can set up lights) Temperature (Stay near campfires to stay warm) Plans for version 1.5 (Pretty much an overhaul update with a lot of new things too) Weapon(s): New* Flamethrower Tweak* Every secondary will have infinite ammo Turret(s) New* Missile launcher New* Flamethrower New* Guided missile launcher New* Grenade launcher Rework* Turret system is being reworked Graphical: New* Fog. Improvement* Better blizzard storm Improvement* Better missile thruster fx Improvement* Better lighting Improvement* Better looking tracer Improvement* New muzzle flash UI: New* Be able to purchase the selected item in the hotbar, without having to go in the shop and find it everytime. Change* The stat upgrader window appear only after every 5th wave. New* Be able to assign build objects to the hotbar. New* Indicate when an item that is required to have power is not connected to a power source Improvement* No 3d gui will be visible unless you hover over it. The only time it will be visible unless you hover over it is in daytime. Change* You now have to hover over stuff that can be refilled, and you have to be in range Removed* Wave settings has been removed because in the next update(v1.6) it will be improved a lot and become more user friendly. So for now only 1 difficulty is playable, which means it will just send you straight in Improvement* Shop UI has been remade. It is more clean now Change* New font. Change* Rename endless mode to Base Defense Monster Spawning: Rework* Spawn system is being reworked. Tweak* Spawns faster now Wave: Rework* Wave system is being reworked. The wave generator is being reworked too Stats: Rework* Stat system is being reworked. Build: Rework* Build system is being reworked. Shop: Rework* Shop system is being reworked. Other: Bug fixes and tweaks The plans may change from time to time Plans for version 1.6 Monster(s): New* Walker model New* Runner model Weapon(s): New* Melee weapons New* Rocket launcher Rework* Weapon system will be reworked. It will feel better, and will be more optimized UI: Rework* Power generator UI rework Rework* Power entity UI rework Wave: Improvement* Continuation of the wave generator rework Mode(s): New* Non endless - You will be able to choose a preset made by you, or other players(if they have shared it). Feature(s): New* Wave creator for non endless mode (Players will be able to make their own waves, like how many monsters spawn, which monsters to spawn, and which ones to spawn first. Players will also be able to save and share what they have made, so other players can play them. It is kinda hard to explain, it will be easier to show when it has been made) New* Base Defense preset creator. You will be able to create your own difficulties basically Improvement* More stuff will be added to the wave generator Here's a concept of the wave creator Plans for future updates: Online co-op Localization - Danish, English, and more Harder boss battles - Special abilities(like summon minions, big AoE attacks, charge, stomp, and more), and more. Pickup placed objects - in case you misplaced something More monsters Music And more... Changelogs Download Standalone build: v1.0 (VERY OLD), v1.4 (The latest version before GameJolt release) [March/10/2017] Just released the game on GameJolt for free http://gamejolt.com/games/blizzard-of-nightmares/230071 I will work on bug fixes, changes, and new additions [July/5/2017] Removed the game on GameJolt for now. I'm probably going to release it again on GameJolt when I have made more progress on the game, so I have more interresting stuff to show
  19. Topdown wave survival game

    Hello everyone, I want to make something else, and I have so many dead projects just lying on my HDD that I want to check out and see if I can do something interresting with if it is a project I would like to work on. So I'm just going finish the update I'm working on now over the next few days, and then release it. There will be more updates, but it will mostly be small updates like, bug fixes, tweaks, and new items. I might make new bigger updates later on, but after the update I'm working on now, it will just be smaller updates until I feel like working on bigger updates for this game I might still make a non GameJolt version of the game, if a lot of people wants that. EDIT: To be honest I didn't have much motivation, it comes and goes. I have written a lot of new ideas down, and planned a few more updates.
  20. Both should work
  21. Topdown wave survival game

    Thanks
  22. Topdown wave survival game

    I haven't updated the game for some time, but I am working on a new update. I have thought about making a non GameJolt version, which uses a MySQL database for user data, and stuff like achievements when I have finished making the game. Anyway, I have added some stuff, and a lot of changes, and fixed a lot of bugs. Here is some of the things that is finished: Added Fog Added a Missile Launcher turret Added a Minigun turret Added bloom Added model for medkit Removed Small turret Removed Tall turret Removed the monster hud Reduced the shininess of the ground Changed slots UI Changed the way the stat upgrade window works. (The window pops up every 5th wave, so now you can't just open it whenever you want) Changed some of the UI in the main menu, and login Optimized the ragdoll initializer significantly And a lot of other internal stuff. Screenshots FOG: Main Menu/Login: Now here is what more I need to finish before releasing the update: New monster: Boomba New build mode feature: Assign items from the build shop to the slots New build mode feature: Buy the item you have selected. (Example: If you have the first slot selected and wooden barricade is assigned to that slot, you can just press the same slot key again and it will automatically purchase one) A few fixes Options will be made in the next update after this one, so you can disable post-process effects, and other graphical settings to increase performance if needed.
  23. Yeah it shouldn't give any errors, so the scripts should still work
×