Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 15, 2017 21:27:52 GMT
To achieve better precision and avoid float i'm using a bit larger numbers for damage/hp variables. So, i've got asteroids splitting into smaller asteroids when they are destroyed, but they also explode on death. I've got an asteroid that has 1000 HP (asteroid health int variable), and i use damage prefab set to per group hit points lost, with a group HP amount set as asteroid health variable (1000 HP) and death prefab are actually those two small asteroids that spawn when the big one is destroyed.
Am i missing something or group HP amount is really locked to 500? I opened the killable script right now and i see that it is indeed limited to 500, why's that?
Will i screw something up if i edit the maximum value in script? (except values reverting to 500 with every update).
|
|
|
Post by DarkTonic Dev on May 15, 2017 22:42:23 GMT
It's fine. What max value would you like? I'll change it in the source.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 16, 2017 8:45:49 GMT
Same as max integer, i think you capped it at 100.000. I tried taking a zero off all health/attack values, but it's no good since there are some damages on collision/trigger stay that deal damage per frame and they're single digit.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 16, 2017 15:07:33 GMT
Btw i don't want to sound silly with that 100k, but it will probably add up to that number. Some basic popcorn enemies have 100-200 HP, some bigger enemies around 2k, low level bosses at least 10k. I don't know how nobody had a problem with this before
|
|
|
Post by DarkTonic Dev on May 16, 2017 17:56:51 GMT
Not seeing what you're seeing. Killable script has hit points and attack points both at 100,000.
Are you using a really old version of CGK?
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 16, 2017 19:29:47 GMT
Group HP amount, i mean i'll have some big HP enemies so i need a higher group hp amount limit. Version is 3.2.7.1
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 16, 2017 19:55:34 GMT
Ah, don't want to open a new thread. After update to 3.2.7.1 from 3.2.7, no prefabs are spawning. Console say all's fine, custom events are fired.
Funny thing is that it looks like there are no receivers. I put variables for valid Qty in custom events, but when i remove the variable and set self, it doesn't let me enter anything else than 0, neither for closes nor for random. When i create a new event, it lets me tweak the values normally, so that sorts it out.
|
|
|
Post by DarkTonic Dev on May 16, 2017 20:06:47 GMT
Ah, don't want to open a new thread. After update to 3.2.7.1 from 3.2.7, no prefabs are spawning. Console say all's fine, custom events are fired. Funny thing is that it looks like there are no receivers. I put variables for valid Qty in custom events, but when i remove the variable and set self, it doesn't let me enter anything else than 0, neither for closes nor for random. When i create a new event, it lets me tweak the values normally, so that sorts it out. Ok, there's not going to be any way to fix that. The data types changed. You will need to delete and recreate your old Custom Events if you want Closest or Random to work. I didn't know that would happen, sorry about that.
|
|
|
Post by DarkTonic Dev on May 16, 2017 20:08:52 GMT
Group HP amount, i mean i'll have some big HP enemies so i need a higher group hp amount limit. Version is 3.2.7.1 That variable controls the max amount of damage prefabs that can be spawned at one time. Do you really want to spawn more than 500 at one time? This is not for HP.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 16, 2017 20:14:54 GMT
No prob, i recreated the events. Oh, i thought it's this Can't enter more than 500.
|
|
|
Post by DarkTonic Dev on May 16, 2017 20:28:14 GMT
No prob, i recreated the events. Oh, i thought it's this Can't enter more than 500. Oh, right it is that. That's used for "per X HP, create one damage prefab". So if you did 5000 points damage to a Killable and wanted to spawn a damage prefab for every 1000 points damage (5 damage prefabs then), it wouldn't let you. So I'll increase that to 100,000 now. Go ahead and change it yourself and see if it lets you go past 5000 or if you will need to remove / re-add the Killable component before it lets you?
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 16, 2017 20:58:31 GMT
Nope, it's not letting me.
|
|
|
Post by DarkTonic Dev on May 16, 2017 21:42:52 GMT
I just did it myself, and not until removing and re-adding a Killable component would it let me enter something higher than 500. The way Unity compiles stuff, it keeps the old default unless you re-add.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 17, 2017 6:06:10 GMT
Could i avoid it by reimporting the asset or i'm gonna have to change it object by object?
|
|
|
Post by DarkTonic Dev on May 17, 2017 6:09:35 GMT
If you delete all CGK scripts, are able to compile (that means commenting out any code you may have written to talk to CGK), and then re-import, that *should* fix everything - not positive here. Or it's going to be prefab by prefab.
We could also permanently fix it by renaming the variable in Killable. I will do that if you prefer, but trying to avoid it since people may lose their values of that in two consecutive updates (but who updates that often anyway?)
|
|