If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.
I want to say “Stop hitting yourself” to my enemies.
I already felt overwhelmed with all these assets that I dragged into my scene. I baked the lights, so I guess I got more FPS this way. I wish I knew how to optimize all of this
It’s coming later in the course
Demo of the updated attacking scripts. Coming along nicely
So it seems my projectile isn’t firing at the set rate, I’ve debugged the code and the secondsBetweenShots is being recognised directly before InvokeRepeating is called but regardless of the time I set the projectiles are firing like crazy as can be seen in my clip above. I’ve compared the code with the github version and it appears to tbe the same. Any idea what I may have missed/done wrong?
Code:
InvokeRepeating("SpawnProjectile", 0.0f, secondsBetweenShots);
Cheers
Pete
Have the changes that you’ve made been applied to the prefab or an instance @KeplerPB, e.g. is the miss firing enemy not aware of your changes.
Hi Rob. I’m just changing the secondsBetweenShots on each instance - just going through the Archetypes lecture so trying different rates of fire etc.
It feels to me like it’s because the invokerepeating() is constantly being called with it being in the update() method, but it seems to work in the lecture so not sure why not with mine?
Solved it!
It was because I had left the distance check to call the CancelInvoke() as an else from the previous if statement.
So it was cancelling the invoke every other frame and invoking it again the frame after.
Phew! Good debugging experience if nothing else!
hehe, nothing like talking to yourself for a few minutes to help resolve a problem…!
Actually, I was here with you, I was just looking through the GitHub repository at what was at that stage and was about to as you if you had put the other if
statement in… hehe…
Thanks Rob, appreciate you looking, I’d been talking to myself for over an hour!! As soon as I wrote the second comment I thought why would it keep being called? Ah maybe its being cancelled then re-called… doh!
No problem Pete
Made a FireBall and a Simple Cast Animation in Maya
freaking wow! love the camera and where you are with this!!! Any tips would be great ( im embarrassed to show mine now)
This is very very good man!
What are you guys using to capture your screen vids?
Personally i used OBS studio (get the studio version its more stable) and its what ben and the team use to live stream.
There are alternatives like bandicam.
The camera is linked in one of the posts somewhere its from a free asset and i adapted it for use slightly.
The best tip i can give is to be mindful of how you will see your terrain. In the course they can get away with a bit more as certain angles wont be seen or got close enough to. This means more higher poly stuff or being a bit clever with barriers and distances
Dont be embarrassed to post. Other than the camera and that i have done zombie runner and terrain making a few times it mostly stock code with free assets
The knight has become the more standard asset for the course it appears
Thanks a ton man … im going to grab that camera, I dont like my fixed angle one. I will eventually add better graphics, I just haven’t had the time. But yours is looking great!
I ended up having to use Bandicam - thanks for that additional suggestion. OBS kept coming up black, doesnt like my GPU apparently.
I’m having some problems with the projectiles at the moment. I need to spend some time with this and see why this strange behavior is happening.