Hi,
what I need is pretty much like the personal unit value you can assign to a unit via triggers, only I don't wan't to use triggers at all! :-P
I need to save a value for every unit (ranging from 0 to about 100). This value has to be decreased whenever the unit is attacked and I have to be able to check its vcurrent value via validators at any time.
I think I might be able to do this by stacking behaviours on every units (so the number of behaviours will be the value), but I really would like to hear from you guys if anyone can think of a different, effcient solution.
Also, some time ago there was a thread about stacks of behaviour causing lag. Do you think 50/100/500 behaviours (without any unit modification whatsoever) would cause lag...?
The lag really depends on the map size; if it's for a massive RPG having 100 behaviors on all units will cause a lot of unnecessary lag. You should really consider the following: Why do you want to use this? Why don't you want to use triggers? Is it really that necessary for your map or is it merely an extra and are you sure you want to make your map lag for this?
If you're sure you want to do this instead of using custom values then your only options are using behaviors or modifying the level of an ability on the unit and checking that level with requirements. I suppose the second one will lag a lot less, but I'm not sure if it'll work and it's obviously a hassle to add them all to every unit you want checked.
Well I don't think triggers will be too effective here, because basically I would have a event fire every time a unit is attacked. On a Big map. With Lots of unit. And thats just fail on bnet.
But yeah, maybe a lot of trouble/lag for a rather small feature. I was just hoping for someone to come up with a crazy approach I haven't thought of! :D
Thanks for the advice, though!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, what I need is pretty much like the personal unit value you can assign to a unit via triggers, only I don't wan't to use triggers at all! :-P
I need to save a value for every unit (ranging from 0 to about 100). This value has to be decreased whenever the unit is attacked and I have to be able to check its vcurrent value via validators at any time.
I think I might be able to do this by stacking behaviours on every units (so the number of behaviours will be the value), but I really would like to hear from you guys if anyone can think of a different, effcient solution.
Also, some time ago there was a thread about stacks of behaviour causing lag. Do you think 50/100/500 behaviours (without any unit modification whatsoever) would cause lag...?
Lots of questions at once, I'm sorry. :-)
Greetings, Obat
The lag really depends on the map size; if it's for a massive RPG having 100 behaviors on all units will cause a lot of unnecessary lag. You should really consider the following: Why do you want to use this? Why don't you want to use triggers? Is it really that necessary for your map or is it merely an extra and are you sure you want to make your map lag for this?
If you're sure you want to do this instead of using custom values then your only options are using behaviors or modifying the level of an ability on the unit and checking that level with requirements. I suppose the second one will lag a lot less, but I'm not sure if it'll work and it's obviously a hassle to add them all to every unit you want checked.
@mark8264: Go
Well I don't think triggers will be too effective here, because basically I would have a event fire every time a unit is attacked. On a Big map. With Lots of unit. And thats just fail on bnet.
But yeah, maybe a lot of trouble/lag for a rather small feature. I was just hoping for someone to come up with a crazy approach I haven't thought of! :D
Thanks for the advice, though!