Commander soul swap
Moderator: Content Developer
Commander soul swap
Following a discussion with Zangeeph I wondered is it possible for two commanders to simultaneously capture one another?
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Commander soul swap
BA doesn't allow or disallow this from happening, so it's dependent on the engine. Test it!
(or read the engine code - probably https://github.com/spring/spring/blob/f ... I.cpp#L761 is a good place to start looking)
(or read the engine code - probably https://github.com/spring/spring/blob/f ... I.cpp#L761 is a good place to start looking)
Re: Commander soul swap
That link looks more like the AI/command handling logic, there is nothing about how the captureProgress is calculated.
Maybe this:
https://github.com/spring/spring/blob/f ... r.cpp#L451
Would guess it depends how units status are updated, and then maybe on their unitID.
But instead just tried it in XTA: Pause game, spawn two commanders, give capture command onto each other.
Always ended in two Coms belonging to same team, with one Com's capture progress at 99%
I tried to position them in (by eye) symmetric way where they did not have to move their arm, same result.
Maybe with testunits that have no animation one can to remove that factor in better way...
Might also want to compare commander with COB script vs commander with Lua script to see which is faster.
If someone can make both coms swap teams by capturing each other at same time then please put them on repeat-mode and make 10 hour wololo video.
Maybe this:
https://github.com/spring/spring/blob/f ... r.cpp#L451
Would guess it depends how units status are updated, and then maybe on their unitID.
But instead just tried it in XTA: Pause game, spawn two commanders, give capture command onto each other.
Always ended in two Coms belonging to same team, with one Com's capture progress at 99%
I tried to position them in (by eye) symmetric way where they did not have to move their arm, same result.
Maybe with testunits that have no animation one can to remove that factor in better way...
Might also want to compare commander with COB script vs commander with Lua script to see which is faster.
If someone can make both coms swap teams by capturing each other at same time then please put them on repeat-mode and make 10 hour wololo video.
Re: Commander soul swap
not possible: one unit will always be marked as captured first (even if both captures would complete on the same frame) and given a stop order before it can cause a swap
Re: Commander soul swap
Interestingly, it is possible for two units to simultaneously reclaim each other. Perfect for when you have a couple of construction bots helplessly stranded behind enemy lines and don't want them going to waste!
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Commander soul swap
You can self destruct them, it will be faster