co op color question
- Gramanaitor
- Posts: 174
- Joined: 24 May 2013, 14:34
- Contact:
(This question is for modders)In some mods, instead of the normal portal colors it has the co op colors. Which lua in the mod changes that?
- HugoBDesigner
- Posts: 2189
- Joined: 19 Sep 2012, 02:23
- Contact:
I was just thinking about it today too. I would like to add this feature to a mod I'm making, but I don't know where to change it...Gramanaitor wrote:(This question is for modders)In some mods, instead of the normal portal colors it has the co op colors. Which lua in the mod changes that?
- TripleXero
- Posts: 892
- Joined: 08 Aug 2012, 00:23
- Contact:
in mario.lua, line 111, change the following
to
Code: Select all
if players == 1 then
self.portal1color = {60, 188, 252}
self.portal2color = {232, 130, 30}
else
self.portal1color = portalcolor[self.playernumber][1]
self.portal2color = portalcolor[self.playernumber][2]
end
Code: Select all
if players == 1 then
self.portal1color = portalcolor[self.playernumber][1]
self.portal2color = portalcolor[self.playernumber][2]
else
self.portal1color = portalcolor[self.playernumber][1]
self.portal2color = portalcolor[self.playernumber][2]
end
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
You only need:
Change the whole thing to that and it should work.
TripleXero's code works, but it is a waste of code
Code: Select all
self.portal1color = portalcolor[self.playernumber][1]
self.portal2color = portalcolor[self.playernumber][2]
TripleXero's code works, but it is a waste of code
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
6 lines, when you need 2, is kind of unnecessary.