|
Post by DarkTonic Dev on Feb 19, 2016 18:18:26 GMT
Yeah this is a Playmaker issue then.
|
|
|
Post by RoboRacer on May 11, 2016 6:22:50 GMT
Hello! I've had Core GameKit for a long time, but just started using it. It's been great for a lot of the concept/play-ability testing/learning that I have been doing.
I was looking to to generating attacks and testing spawning in the forums and stumbled on this thread. Krmko, I realize the Dropbox link was for DarkTonic so I apologize for also picking it up on the sly. It has been very helpful though even though my game is in 3d.
Currently I'm having some issues with the player and it's projectiles. When I turn on the logs, it shows my player is constantly interacting with the ground but not taking damage. I'm not sure of the long reaching effects, but it makes reading the log for other items much harder.
The projectile is currently being hit by the player 3 times before making it's way to the enemy. It it set to die on collision but keeps going, and doesn't stop after successfully hitting the enemy.
As a placeholder as I attempt to learn how things work I have some of Krmko's code in this test project. That include the Instantiate bullet code. However I can't get the mentioned "PoolBoss.Spawn" to work and haven't found any references to that in the docs or the .cs files I've gone though.
I'm thinking those issues are all tied together, and that maybe the call was changed or I'm just messing up the code.
Apologies for hijacking a thread, helping myself to the linked project, and potentially missing something obvious.
Thanks you for your time.
|
|
|
Post by DarkTonic Dev on May 11, 2016 20:06:17 GMT
Hello! I've had Core GameKit for a long time, but just started using it. It's been great for a lot of the concept/play-ability testing/learning that I have been doing. I was looking to to generating attacks and testing spawning in the forums and stumbled on this thread. Krmko, I realize the Dropbox link was for DarkTonic so I apologize for also picking it up on the sly. It has been very helpful though even though my game is in 3d. Currently I'm having some issues with the player and it's projectiles. When I turn on the logs, it shows my player is constantly interacting with the ground but not taking damage. I'm not sure of the long reaching effects, but it makes reading the log for other items much harder. The projectile is currently being hit by the player 3 times before making it's way to the enemy. It it set to die on collision but keeps going, and doesn't stop after successfully hitting the enemy. As a placeholder as I attempt to learn how things work I have some of Krmko's code in this test project. That include the Instantiate bullet code. However I can't get the mentioned "PoolBoss.Spawn" to work and haven't found any references to that in the docs or the .cs files I've gone though. I'm thinking those issues are all tied together, and that maybe the call was changed or I'm just messing up the code. Apologies for hijacking a thread, helping myself to the linked project, and potentially missing something obvious. Thanks you for your time. Please explain what you mean by PoolBoss.Spawn "not working". Are you able to compile or not? Re: player's weapon hitting the player, you should put that in a layer that's not in the list of layers that hurts the players (and vice versa: the player's layer should not be in a layer that hurts the projectile). I don't know if your player is supposed to take damage from the ground, so no comment there. You should make "HP Death Mode" set to "Any Hit" so it dies when it hits enemy. Or make it such a low HP for the projectile that it will regardless or what it hits.
|
|
|
Post by RoboRacer on May 12, 2016 0:06:52 GMT
with PoolBoss.Spawn I was unable to compile. I can post that error I had when I get home. Sorry for not including that.
My understanding from the earlier posts was that the code in question needed to having Using DarkTonic.CoreGameKit at the top and Instantiate needed to be replaced with PoolBoss.Spawn. Perhaps I misread or oversimplified what was really needed.
- I didn't think about the layers for the player and weapon. I'll take a look at that today. -The player is not normally meant to take damage from the ground. I was thinking of eventually adding that (burning ground for x seconds) but by default the ground should be safe.
Thanks for your time. Sorry a lot of that was unclear. -I bullet has 1hp currently. I tried a few of the "HP Death Mode" options before that, but I'll go back to them and check the logs for results there.
|
|
|
Post by RoboRacer on May 12, 2016 2:30:25 GMT
Correction. I get the following error after adding the using DarkTonic and PoolBoss.Spawn
NotImplementedException: The requested feature is not implemented. DarkTonic.CoreGameKit.PoolBoss.Spawn (UnityEngine.Transform shotPrefab) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:26) WeaponScript.Attack (Boolean isEnemy) (at Assets/WeaponScript.cs:35) PlayerScript.Update () (at Assets/PlayerScript.cs:27)
|
|
|
Post by DarkTonic Dev on May 12, 2016 3:10:01 GMT
Yeah that's not a compile error, it's runtime. I'm pretty sure we don't have any NotImplementedExceptions in our code (something you have to explicitly throw). I need an up to date line number though. Please update CGK to the latest and send me the error you get. That may just fix the problem.
You probably want to put the ground into another layer also (that isn't in the Layer filter of the player Killable so it won't get damaged by it.
|
|
|
Post by RoboRacer on May 13, 2016 4:28:27 GMT
Well I tried to work some more with what I had going and the NotImplemented error showed as being from line 26 of PoolBoss.cs
I didn't see any need to update from the asset store import page, so I uninstalled all the CGK items and reimported them.
After that, I remade the adjustments I had previously made. However, for some reason I am back to a compile error. After adding Using CGK to the top I added the PoolBoss.Spawn and Spawn was marked as an error. "No overload for method 'Spawn' takes '1' argument.
I'll probably try to create a separate project recreating this and email you a link to that if that's no problem.
|
|
|
Post by DarkTonic Dev on May 13, 2016 15:48:39 GMT
That is correct, you need 3 parameters for SpawnInPool or SpawnOutsidePool, and 4 for Spawn. So pass them Param 2 & 3 are position and quaternion just like Instantiate.
|
|
|
Post by RoboRacer on May 14, 2016 1:45:14 GMT
That helped. Eventually got it. Bullets die, enemies die. Player does not die from own bullet. Awesome. Thanks.
|
|
|
Post by DarkTonic Dev on May 14, 2016 7:46:44 GMT
No problem.
|
|