mush
New Member
Posts: 39
Posts: 39
|
Post by mush on Jan 10, 2015 1:31:52 GMT
Yes #1 you have already nailed - i made another Prefab Pool - (and loving it!)
#2 It would be nice to be able to spawn child prefabs from main prefab when it is first spawned.
#3 I am using this to do flash:
public float flashPulse = 0.1f; public float flashDuration = 0.9f; public Color flashColor = Color.red; public Transform flashObject; public int currentHealth = 10;
private bool flashing; private Color originalColor; private int tempHealth;
private bool hitColor = false; private float nextFlash; private float stopFlashTime;
void Awake() { if(flashObject == null) flashObject = transform;
originalColor = flashObject.GetComponent<Renderer>().material.color; } void Update() { if (currentHealth < tempHealth) { flashing = true; stopFlashTime = Time.time + flashDuration; } tempHealth = currentHealth; if (flashing) { Flash (); if (Time.time > stopFlashTime) { flashObject.GetComponent<Renderer>().material.color = originalColor; flashing = false; } } } void Flash() { //This is for slow down effect if(tag == "Player") { if(Time.timeScale != 0.0f) Time.timeScale = 0.3f; }
flashObject.GetComponent<Renderer>().material.color = (hitColor) ? flashColor : originalColor; if(Time.time > nextFlash) { hitColor = !hitColor; nextFlash = Time.time + flashPulse; } }
|
|
|
Post by DarkTonic Dev on Jan 10, 2015 7:25:24 GMT
Yes #1 you have already nailed - i made another Prefab Pool - (and loving it!) #2 It would be nice to be able to spawn child prefabs from main prefab when it is first spawned. You can already do #2. Just put a Triggered Spawner on the first prefab and use the Spawned or Enabled event to spawn whatever else you want. Those other things you spawn can do the same if you like. Your scripting for #3 relies on a certain type of shader that actually has a color on the material, so I don't think we'll be adding something like that.
|
|
mush
New Member
Posts: 39
Posts: 39
|
Post by mush on Jan 12, 2015 5:43:23 GMT
Awesome thank you very much.
With #2 - I spawn a seed (the original prefab) which within 1 second dies and it spawns and enemy but because the seed dies the infinte wave spawner spawns another seed. How can I get the ininite spawner not to spawn another seed until the seed's children are dead?
|
|
|
Post by DarkTonic Dev on Jan 12, 2015 6:51:22 GMT
Awesome thank you very much. With #2 - I spawn a seed (the original prefab) which within 1 second dies and it spawns and enemy but because the seed dies the infinte wave spawner spawns another seed. How can I get the ininite spawner not to spawn another seed until the seed's children are dead? You'll have to code that. If the seeds children are of a unique prefab type, you could ask Pool Boss if there are any of that prefab spawned. If not, spawn a new seed. That code would look like this: if (PoolBoss.PoolItemInfoByName("yourSeedPrefabName")._despawnedClones.Count == 0) { // spawn a new one via code }
I'm adding a friendlier looking method for this in the next version, but this should work for now. The new method will still require coding though.
|
|
|
Post by llamapixel on Jan 12, 2015 8:10:08 GMT
Where can I find a URL on the updates to this "unity3d middleware" module.
I have to visit Japan during the end of January but would like to see what progress has been made and check in again on Feb. I skimmed this post but would prefer an easy list to read of updates, changes etc. Do you have a running list of fixes and updates page?
|
|
|
Post by DarkTonic Dev on Jan 12, 2015 8:24:19 GMT
Where can I find a URL on the updates to this "unity3d middleware" module. I have to visit Japan during the end of January but would like to see what progress has been made and check in again on Feb. I skimmed this post but would prefer an easy list to read of updates, changes etc. Do you have a running list of fixes and updates page? I'm not sure what you're referring to. What's the Unity 3D middleware module? I post to ( this thread here) every time there's a new version.
|
|
|
Post by llamapixel on Jan 13, 2015 8:01:14 GMT
Your core game kit package is middleware to unity3d. I am looking for the development coding log that shows me a list of version changes and bugfixes.
|
|
|
Post by DarkTonic Dev on Jan 13, 2015 9:26:13 GMT
Your core game kit package is middleware to unity3d. I am looking for the development coding log that shows me a list of version changes and bugfixes. Ah you want the release notes. The complete up-to-date release notes is always in the first post on the Unity forum thread, after the video links and screen shots: forum.unity3d.com/threads/30-sale-released-core-gamekit-pooling-spawning-combat-regularly-50.167910/Also, the thread I pointed out above, here in this forum, has all the release notes made since the forum came into existence. It's a better thing to subscribe to for updates since only I post there.
|
|
|
Post by thehobliks on Jan 13, 2015 16:54:31 GMT
sorry for the delay. i completely forgot to respond to this but yes. i further tested it and the mouse click event functions just like tap events on mobile.
|
|
|
Post by DarkTonic Dev on Jan 13, 2015 17:24:54 GMT
Ok, good to know.
|
|
|
Post by thehobliks on Jan 13, 2015 23:23:13 GMT
no problem! but yeah....touch 2 objects at the same time please 
|
|
|
Post by DarkTonic Dev on Jan 13, 2015 23:32:54 GMT
no problem! but yeah....touch 2 objects at the same time please  Sorry, but not sure how to do that. I think it's better left to mobile control plugins.
|
|
|
Post by timmypowergamer on May 4, 2015 15:25:09 GMT
Would it be possible for you to add an additional DespawnMode to Killable for "AnyCollisionOrTrigger"? The "CollisionOrTrigger" mode right now only works when it collides with another Killable, but I need some projectiles to die when they hit things like world geometry too (i.e. when they collide with anything at all). It doesn't make a lot of sense for me to add Killables to all of my world geometry. For the moment I have just subclassed Killable for these projectiles to do what I need. I just think it would be convenient to have the option on the base Killable. Or is there already a way to do what I want that I'm just missing?
|
|
|
Post by DarkTonic Dev on May 5, 2015 6:14:26 GMT
Would it be possible for you to add an additional DespawnMode to Killable for "AnyCollisionOrTrigger"? The "CollisionOrTrigger" mode right now only works when it collides with another Killable, but I need some projectiles to die when they hit things like world geometry too (i.e. when they collide with anything at all). It doesn't make a lot of sense for me to add Killables to all of my world geometry. For the moment I have just subclassed Killable for these projectiles to do what I need. I just think it would be convenient to have the option on the base Killable. Or is there already a way to do what I want that I'm just missing? You're right, there's no way to do that. We actually do add Killable to all our world geometry (the ones that can hurt you anyway) and make things invincible if they can't be destroyed. That could be a workaround for you until we add the feature. I'll put it on the list.
|
|
acorrow
New Member
Posts: 6
Posts: 6
|
Post by acorrow on Sept 10, 2015 18:52:00 GMT
That last one is great (killing killables on any collision), perhaps layer/tag based would be best?
Anyway, maybe I'm just missing something, but a good idea may be a proximity event for Triggered Spawners. Just using a tag filter would work well. If your player is within X start spawning. I do this with Code Triggered events and some logic, but it would be pretty nice to have it just as a built in event. Not really the place for it I guess, but the reason that I'm not just using ontriggerenter2d is because I can't seem to figure out how to keep triggering it while IN the trigger... So I just do my own logic to handle it.
The example may be... a cannon that is inactive until you are standing x distance away, or standing in a specific zone. I would want it to keep triggering, limited by the retrigger Limit Mode setting.
Just a thought, maybe there's an easy way to do that and I'm missing it.
As always, well done with this.
|
|