https://code.google.com/p/evolutionrts/ ... lector.lua
I need this to check if the unit that has "cancollect" is finished building before it takes effect.
Preferably before tomorrow (tomorrow is a gameday) and I just realized that this was a problem. In the heat of battle you could have a con start building one of these and insta reclaim or convert to drones, without actually having to finish building it.
I can haz halp? I did try to mangle it using logic from another gadget, but I couldn't figure out how to properly implement it.
[Halp] Result happens before unit is done building
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
[Halp] Result happens before unit is done building
Last edited by Forboding Angel on 11 Oct 2013, 21:25, edited 1 time in total.
Re: [Halp] Result happens before unit is done building
Code: Select all
if UnitDefs[Spring.GetUnitDefID(unit)].customParams.cancollect and select(5, Spring.GetUnitHealth(unit)) == 1 then
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Halp] Result happens before unit is done building
You can do that?FLOZi wrote:Ugly but, w/eCode: Select all
if UnitDefs[Spring.GetUnitDefID(unit)].customParams.cancollect and select(5, Spring.GetUnitHealth(unit)) == 1 then
I agree that it isn't pretty like what I was trying to mangle out of smoth's code, but at the same time, if it works, I'm not going to complain. I discovered this at the 11th hour, so to speak, so I'm in panic mode atm.
Re: [Halp] Result happens before unit is done building
Should be fine though I can't quite remember if it needs to be 1 or 0; 1 would be most logical, but, this is Spring. 

- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Halp] Result happens before unit is done building
Hehehe :-D
Works perfectly, thanks. I was really worried about this. It seems that some of the people who play evo will exploit bugs repeatedly, even if they are super broken and refuse to ignore those exploits when playing vs others.
Basically, some people like to be complete and total assholes. Shocker.
Thanks :-D
Works perfectly, thanks. I was really worried about this. It seems that some of the people who play evo will exploit bugs repeatedly, even if they are super broken and refuse to ignore those exploits when playing vs others.
Basically, some people like to be complete and total assholes. Shocker.
Thanks :-D
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: [Halp] Result happens before unit is done building
That fix isn't particularly ugly. It would be nicer to add valid units to a table in UnitFinished and remove them when destroyed.
Also I wouldn't call your players assholes. They don't know exactly what your design is, this bug barely breaks anything and it not feasible to avoid exploiting this bug (what if you actually want to build an Orb?).
Also I wouldn't call your players assholes. They don't know exactly what your design is, this bug barely breaks anything and it not feasible to avoid exploiting this bug (what if you actually want to build an Orb?).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Halp] Result happens before unit is done building
I said, "some of the people". Being an in this case isn't necessarily a bad thing, it just means that you like to win, regardless of whether something is totally broken or not.
As to this not being a serious exploit...
Actually, it is. If after a battle, you were to start building an orb in the center of all those cores lying around, you could easily wind up with 100+ metal and energy and you could simply pop the orb construction and not lose the 40 metal spent on the orb. So yeah, it's a pretty serious thing.
Also, I'm talking about people who continue to exploit it even after the fact that it is a bug has been established, forcing me to release a new version on the spot, which causes the host to have to empty out, etc etc. When, instead, they could just not exploit it and save everyone the trouble.
But no, one jerk causes issues for everyone else. It's a very not nice thing to do in that situation.
As to this not being a serious exploit...
Actually, it is. If after a battle, you were to start building an orb in the center of all those cores lying around, you could easily wind up with 100+ metal and energy and you could simply pop the orb construction and not lose the 40 metal spent on the orb. So yeah, it's a pretty serious thing.
Also, I'm talking about people who continue to exploit it even after the fact that it is a bug has been established, forcing me to release a new version on the spot, which causes the host to have to empty out, etc etc. When, instead, they could just not exploit it and save everyone the trouble.
But no, one jerk causes issues for everyone else. It's a very not nice thing to do in that situation.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: [Halp] Result happens before unit is done building
From your post I infer that Orbs can now be built outside of factories. I did not know this.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Halp] Result happens before unit is done building
Ahh ok, that puts what you were saying in an entirely different perspective. Gotcha 
Edit: Yeah, I'm little by little shifting the focus of gameplay from being forced to be so reliant on hovers. Orbs being built in the field just kind of makes sense really.

Edit: Yeah, I'm little by little shifting the focus of gameplay from being forced to be so reliant on hovers. Orbs being built in the field just kind of makes sense really.