|
Post by gearedgeek on Feb 9, 2017 0:00:53 GMT
I'm currently using Third Person Controller from Opsive for the player. When a player fires a weapon it shoots a projectile prefab so I have attached the killable to the projectile prefab.
I have added a basic crate prefab (with a rigidbody and collider) to the PoolBoss and PrefabPools. Then I create a spawner and one wave to spawn the crate prefab. I have attached the killable to that crate prefab.
I'm trying to set it up where the player destroys the crate score will be added and the game is over. I have tried watching the tutorial video but it's so out date that it's hard to understand how to set this up...
The Transform 'LargeCrate_mobile' passed to Despawn is not in Pool Boss. Not despawning. UnityEngine.Debug:LogError(Object) DarkTonic.CoreGameKit.LevelSettings:LogIfNew(String, Boolean) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Level/LevelSettings.cs:1198) DarkTonic.CoreGameKit.PoolBoss:Despawn(Transform) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:872) DarkTonic.CoreGameKit.Killable:DespawnPrefab() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1275) DarkTonic.CoreGameKit.Killable:DespawnThis() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1442) DarkTonic.CoreGameKit.Killable:DespawnOrRespawn() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1401) DarkTonic.CoreGameKit.Killable:Despawn(EventType) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1377) DarkTonic.CoreGameKit.Killable:LateUpdate() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:542)
|
|
|
Post by DarkTonic Dev on Feb 9, 2017 0:26:25 GMT
It says it's not in Pool Boss (as in not set up in Pool Boss). So go to Pool Boss (under LevelSettings game object) and add "LargeCrate_Mobile" as a Pool item and that problem will go away. Every single prefab you use in Core GameKit needs to be in there. Or you can turn on "auto-add missing items" while testing stuff and that will "just work".
The name of the prefab needs to match exactly a pool item in Pool Boss.
|
|
|
Post by gearedgeek on Feb 9, 2017 0:39:14 GMT
I added 'Projectile" (that the weapon fires which has the killable attached) and "LargeCrate" to the Pool Boss but I'm still getting those errors and they are not despawning.
The Transform 'LargeCrate_mobile' passed to Despawn is not in Pool Boss. Not despawning. UnityEngine.Debug:LogError(Object) DarkTonic.CoreGameKit.LevelSettings:LogIfNew(String, Boolean) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Level/LevelSettings.cs:1198) DarkTonic.CoreGameKit.PoolBoss:Despawn(Transform) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:872) DarkTonic.CoreGameKit.Killable:DespawnPrefab() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1275) DarkTonic.CoreGameKit.Killable:DespawnThis() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1442) DarkTonic.CoreGameKit.Killable:DespawnOrRespawn() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1401) DarkTonic.CoreGameKit.Killable:Despawn(EventType) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1377) DarkTonic.CoreGameKit.Killable:PerformDeath(String, Boolean) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:933) DarkTonic.CoreGameKit.Killable:LateUpdate() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:497)
|
|
|
Post by gearedgeek on Feb 9, 2017 0:42:15 GMT
All the settings of the killable is set to default. All I have done is drag/drop the "LevelWaveSettings" prefab to my scene then added the prefabs to the Pool Boss and PrefabPools. Then added a spawner and configured a single wave so it spawns one LargeCrate. When I start the scene the crate will spawn after a couple of seconds then when I shoot it that error shows up.
|
|
|
Post by DarkTonic Dev on Feb 9, 2017 0:43:30 GMT
You should see the problem from the message. You added "LargeCrate", but it's trying to despawn "LargeCrate_mobile", which is not the same name. I said the name has to match exactly. Did you put the Killable component on a sub-game object or something? That will not work, it has to go on the top-level game object of the prefab.
If you don't ever spawn or despawn "Projectile" then it doesn't need to be in Pool Boss.
|
|
|
Post by gearedgeek on Feb 9, 2017 1:05:15 GMT
I have sent you a PM with a video of what I have done.
|
|
|
Post by gearedgeek on Feb 9, 2017 1:10:55 GMT
It says it's not in Pool Boss (as in not set up in Pool Boss). So go to Pool Boss (under LevelSettings game object) and add "LargeCrate_Mobile" as a Pool item and that problem will go away. Every single prefab you use in Core GameKit needs to be in there. Or you can turn on "auto-add missing items" while testing stuff and that will "just work". The name of the prefab needs to match exactly a pool item in Pool Boss. I checked "Auto-add Missing Items" and I figured out that I was only adding the pallet and not the crate itself. The prefab is the pallet and crate together.
|
|
|
Post by gearedgeek on Feb 9, 2017 2:30:12 GMT
I have came across this error and I'm not sure why. NullReferenceException: Object reference not set to an instance of an object CoreGameKitVariableIntGetValue.UpdateVariable () (at Assets/Plugins/DarkTonic/CoreGameKit/PlaymakerCustomActions/CoreGameKitVariableIntGetValue.cs:36) CoreGameKitVariableIntGetValue.OnEnter () (at Assets/Plugins/DarkTonic/CoreGameKit/PlaymakerCustomActions/CoreGameKitVariableIntGetValue.cs:21) HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:201) HutongGames.PlayMaker.FsmState.OnEnter () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169) HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2603) HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2561) HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2489) HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2278) HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2303) HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2290) PlayMakerFSM.SendEvent (System.String eventName) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:656) CGKPlaymakerUtility.SendEventIfValid (.PlaymakerEventSetting eventSetting, System.Collections.Generic.Dictionary`2 eventsByFsmName) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Utility/CGKPlaymakerUtility.cs:74) WorldVariablePlaymakerListener.UpdateValue (Int32 newValue, Int32 oldValue) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariablePlaymakerListener.cs:26) DarkTonic.CoreGameKit.InGameWorldVariable.UpdateIntValue (Int32 val, Int32 oldVal) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs:239) DarkTonic.CoreGameKit.InGameWorldVariable.set_CurrentIntValue (Int32 value) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs:64) DarkTonic.CoreGameKit.WorldVariableTracker.Init () (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:111) DarkTonic.CoreGameKit.WorldVariableTracker.Awake () (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:47)
|
|
|
Post by DarkTonic Dev on Feb 9, 2017 6:27:07 GMT
Around 3 minutes in the video you add Killable to a sub-game object (not the top level game object of the prefab). As I said that will not work because it's not the name of the prefab (and not the same game object in fact). You need to add it to the top-level game object and remove it from the sub-game object. Then it should work properly.
Re your other error, please delete the plugin and reinstall. Very rarely the text file used to hold world variables get corrupted, that may be the issue.
|
|
|
Post by DarkTonic Dev on Feb 9, 2017 6:49:18 GMT
Never mind my comment about the error. Don't delete / reinstall. I didn't see the screen shot. I won't be able to tell what you're doing wrong from a single screen shot though.
It looks like you are using one of the Playmaker Listeners, right? What is it set up to do and when? Probably your FSM is doing something a little too early (since it's firing on Awake) and it's breaking. Let's see your Playmaker Listeners and the FSM.
|
|
|
Post by DarkTonic Dev on Feb 9, 2017 6:51:51 GMT
I saw you set up a Prefab Pool in the video. I need to mention that you don't need to use the Prefab Pools feature, that's optional. Those are for spawning not a specific prefab, but a random one from a group of weighted prefabs. That means that if you only have 1 thing in the Prefab Pool (like you do), then it's exactly the same as just using that specific prefab except that it takes longer to set up.
I know the names are a bit confusing as both Prefab Pools and Pool Boss use the word "pool" but I couldn't figure out a way to describe them better.
Pool Boss is mandatory to use. Prefab Pools are optional.
|
|
|
Post by gearedgeek on Feb 24, 2017 8:34:09 GMT
I have no idea how to fix these issues! I'm using Playmaker.
Could not find World Variable 'Score'. UnityEngine.Debug:LogError(Object) DarkTonic.CoreGameKit.LevelSettings:LogIfNew(String, Boolean) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Level/LevelSettings.cs:1198) DarkTonic.CoreGameKit.WorldVariableTracker:GetWorldVariable(String) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:204) CoreGameKitVariableIntGetValue:UpdateVariable() (at Assets/Plugins/DarkTonic/CoreGameKit/PlaymakerCustomActions/CoreGameKitVariableIntGetValue.cs:35) CoreGameKitVariableIntGetValue:OnEnter() (at Assets/Plugins/DarkTonic/CoreGameKit/PlaymakerCustomActions/CoreGameKitVariableIntGetValue.cs:21) HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:201) HutongGames.PlayMaker.FsmState:OnEnter() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169) HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2603) HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2561) HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2489) HutongGames.PlayMaker.Fsm:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1796) HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2071) HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2222) HutongGames.PlayMaker.Fsm:Event(FsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2303) HutongGames.PlayMaker.Fsm:Event(String) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2290) PlayMakerFSM:SendEvent(String) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:656) CGKPlaymakerUtility:SendEventIfValid(PlaymakerEventSetting, Dictionary`2) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Utility/CGKPlaymakerUtility.cs:74) WorldVariablePlaymakerListener:UpdateValue(Int32, Int32) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariablePlaymakerListener.cs:26) DarkTonic.CoreGameKit.InGameWorldVariable:UpdateIntValue(Int32, Int32) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs:239) DarkTonic.CoreGameKit.InGameWorldVariable:set_CurrentIntValue(Int32) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs:64) DarkTonic.CoreGameKit.WorldVariableTracker:Init() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:111) DarkTonic.CoreGameKit.WorldVariableTracker:Awake() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:47)
NullReferenceException: Object reference not set to an instance of an object CoreGameKitVariableIntGetValue.UpdateVariable () (at Assets/Plugins/DarkTonic/CoreGameKit/PlaymakerCustomActions/CoreGameKitVariableIntGetValue.cs:36) CoreGameKitVariableIntGetValue.OnEnter () (at Assets/Plugins/DarkTonic/CoreGameKit/PlaymakerCustomActions/CoreGameKitVariableIntGetValue.cs:21) HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:201) HutongGames.PlayMaker.FsmState.OnEnter () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169) HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2603) HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2561) HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2489) HutongGames.PlayMaker.Fsm.Start () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1796) HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2071) HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2222) HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2303) HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2290) PlayMakerFSM.SendEvent (System.String eventName) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:656) CGKPlaymakerUtility.SendEventIfValid (.PlaymakerEventSetting eventSetting, System.Collections.Generic.Dictionary`2 eventsByFsmName) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Utility/CGKPlaymakerUtility.cs:74) WorldVariablePlaymakerListener.UpdateValue (Int32 newValue, Int32 oldValue) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariablePlaymakerListener.cs:26) DarkTonic.CoreGameKit.InGameWorldVariable.UpdateIntValue (Int32 val, Int32 oldVal) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs:239) DarkTonic.CoreGameKit.InGameWorldVariable.set_CurrentIntValue (Int32 value) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs:64) DarkTonic.CoreGameKit.WorldVariableTracker.Init () (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:111) DarkTonic.CoreGameKit.WorldVariableTracker.Awake () (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableTracker.cs:47)
|
|
|
Post by gearedgeek on Feb 24, 2017 11:43:41 GMT
Apparently, the World Variable Playmaker Listener component is causing those errors. Once I remove that component the errors disappears.
|
|
|
Post by DarkTonic Dev on Feb 24, 2017 16:26:09 GMT
Do you actually have a World Variable called "Score" or not? If you don't, create one.
If you do, you will need to send me a sample project because I can't reproduce the errors.
|
|
|
Post by gearedgeek on Feb 24, 2017 20:03:05 GMT
I keep the default Score World Variable when I added the Level Wave Settings prefab to the scene. Then I'm using Core Game Kit variable Int Get Value and entered Score into the World Variable Name.
|
|