swapper trap

Share level design tips, problems, and solutions

swapper trap

Postby CCX » Wed Apr 13, 2011 5:07 pm

Might be more a gameplay question than editor, but anyhow:

For multiplayer levels with 2 groups (colors) it's pretty obvious what the swapper trap would do (swap to the one and only other group). Less clear to me is what happens with 3+ groups. Does it (pseudo)randomly select a group to switch the clone to, or is there some rules around it?
User avatar
CCX
Clones Junior
 
Posts: 192
Joined: Tue Aug 10, 2010 5:21 pm

Re: swapper trap

Postby rt » Wed Apr 13, 2011 6:47 pm

It will swap to the next active group on the map. The group order is:
blue
green
red
grey
white
yellow
orange
purple

So if the map has blue, red, and yellow groups then when the red clone walks into a swap trap a yellow clone will come out.
User avatar
rt
Developer
 
Posts: 566
Joined: Wed Jan 02, 2008 1:32 pm
Location: MB, Canada

Re: swapper trap

Postby CCX » Sun May 08, 2011 5:03 am

I'm foreseeing possible need in the future to build my own custom swap trap out of other contraptions, to have better control over the color changes (eg. level may have non-playable mini-AI-controlled groups that shouldn't be subject to swapping, since it can't be done in a fair manner). It's not too hard to make it work, and I'm even able to get it to look pretty close to the swap trap, but I need some help replicating the varying tint.

I think I might be able to replicate it with 3 overlapping background contraptions of identical graphics, with red, green and blue tint, and then use modifytraps to vary the alphas of each to continually change the distribution of the 3 primary colors. It'll take a bit of experimentation though to make it look right, so it'd help a lot if you can simply give out the formula the game currently uses to continually vary the tint on the swap trap.
User avatar
CCX
Clones Junior
 
Posts: 192
Joined: Tue Aug 10, 2010 5:21 pm

Re: swapper trap

Postby rt » Tue May 10, 2011 2:44 pm

CCX wrote:it'd help a lot if you can simply give out the formula the game currently uses to continually vary the tint on the swap trap.


Sure, the swap trap cycles through all 8 group colors changing each color channel independently to gradually match the next color. Here are the RGB for the group colors:

Code: Select all
byte swap_tint[8][3] = { {0,0,252},{0,252,0},{252,0,0},{0,0,0}, {252,252,252},{252,252,0},{252,128,0},{128,0,252} };


When a clone is swapped the swap trap changes to that color right away, and then continues the cycle.
User avatar
rt
Developer
 
Posts: 566
Joined: Wed Jan 02, 2008 1:32 pm
Location: MB, Canada


Return to Clones Level Designers

Who is online

Users browsing this forum: No registered users and 7 guests

cron