Hello everyone, am trying to create custom battle event node, so i unzipped and imported ork gameplay_source_code, but am getting these ork related errors. Not really good in coding. The errors are stated below.
Assets/ORK Framework/gameplay_source_code/gameplay_source_code/ORK Framework Gameplay/Framework/AssemblyInfo.cs(11,12): error CS0579: The attribute `System.Reflection.AssemblyCompanyAttribute' cannot be applied multiple times
It's a code project for compiling the ORK DLLs.
If you really want them in your Unity project, remove the AssemblyInfo.cs file (not needed for ORK).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
What sort of custom battle event are you wanting to build?
Then the prefabNode script seems to be in charge of spawning and destroying prefabs. Just like the combatant spawner script, it seems you are calling a parent class method. Am just seeing spawn prefab and destroy prefab. Am using pool boss by https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:2178 from the asset store . With pool boss, all i need to do is replace instantiate with PoolBoss.Spawn and destroy with PoolBoss.Despawn.
Please bear with me, am not a programmer
The instantiation actually happens in the Combatant.Spawn() method. It uses some private fields to get the referenced prefab to spawn, so you might have to put your modifications in this method.
I generally try to avoid modifying the ORK gameplay code and just write my own classes to extend it, but in this case you might have to modify Combatant.cs and recompile the ORK code.
Note that Combatant.cs is a data object and not the component that is actually placed on the character in the scene; that one is CombatantComponent.cs.
The instantiation actually happens in the Combatant.Spawn() method. In which script can i find this method? In the combatantspawner script i can find some methods like SpawnSingle, SpawnAll. I can't find where the gameobjects of the combatant where instantiated within the methods
Might also give you trouble with equipment viewers on the combatant, which also need to reset which combatant they're part of - and which equip change events they listen to ...
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you want to replace all object spawning with pooling, I'd recommend opening the source code in Mono Develop or Visual Studio and just search for all occurences of the Instantiate function (usually GameObject.Instantiate). The provided source is a Mono Develop project, you just need to add the Unity and ORK DLL references as explained here.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
@gamingislove thank you. Contacted the owner of the asset(pool boss from the asset store), for possible integration with ork.