View Full Version : Blue screen or Red Map = problems
Edward
09-29-2003, 10:12 AM
Hi!
I have here a COG that changes a custom made 256x256 blue MAT file into stars2.mat, and tints the room red. But it crashes when I try!
# See the inside of the tie from a screen!
#
# By Edward
flags=0x240
symbols
message startup
message activated
surface screen
thing cam
surface window0
surface window1
surface window2
surface window3
surface window4
surface window5
surface window6
surface window7
surface window8
sector room1
sector room2
material type0
material type1
int cmp=0 local
int z=0 local
end
#
code
startup:
SetColorMap(room1,cmp);
SetColorMap(room2,cmp);
for(z=0; z<9; z=z+1)
{
SetSurfaceMat(window0[z],type0[cmp]);
}
return;
activated:
if(GetSenderRef()!=screen) return;
If(cmp==0)
{
cmp=1;
SetCameraFocus(0,cam);
}
else
{
cmp=0;
SetCameraFocus(0,GetLocalPlayerThing());
}
SetColorMap(room1,cmp);
SetColorMap(room2,cmp);
for(z=0; z<9; z=z+1)
{
SetSurfaceMat(window0[z],type[cmp]);
}
return;
end
Help?
/Edward
Edward
09-29-2003, 10:15 AM
I block out Color map, it crashes. I block out Set Mat, it doesn't crash, BUT it doesn't change to red map! I'm using 01narsh, and I got that piece of code from 16fall.
/Edward
lucky_jackpot
09-29-2003, 02:24 PM
Hi there http://forums.massassi.net/html/smile.gif
Well after a cursory glance, your array usage/assignment is wrong in the final "for" loop of activated - "type", where (in your symbols section) you have declared only "type0" and "type1"... http://forums.massassi.net/html/wink.gif
Hope this has given you some ideas to play around with (and been of some help...) http://forums.massassi.net/html/biggrin.gif
-Jackpot
------------------
Are you feeling lucky, cuz if you are, get your hands off me... http://forums.massassi.net/html/wink.gif
"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
[This message has been edited by lucky_jackpot (edited September 29, 2003).]
Edward
10-03-2003, 09:36 AM
Thank you for pointing that out.
And sorry for the delay, I got... Destracted...
All works apart from the tinting... Help?
ZOOIkes
10-03-2003, 02:45 PM
maybe try setsectorcolormap instead of setcolormap
and are you sure that the cmp should be an int? (would seem the most logic to me too, but juat asking)
------------------
Call me Vedder.
Author of: A Pirate's Tale (Mots SP)
APT homepage (http://www.xs4all.nl/~ceekelen/)
----
<phantom> You're always going to be aloser if you attempt to aspire to massassi standards.
<phantom> They're a bunch of socially inadequate <beep> whores who have little or no lives.
[This message has been edited by ZOOIkes (edited October 03, 2003).]
Edward
10-03-2003, 03:34 PM
No change when I had SetSectorColormap.
I checked DataMaster, but it just said (sector,cmp) and no indication on what it should be, nor did I find a cmp symbol thingy... And:
<font face="Verdana, Arial" size="2">
I'm using 01narsh, and I got that piece of code from 16fall.
</font>
Something should work if I got it from a working COG.
/Edward
DogSRoOL
10-03-2003, 10:55 PM
I don't have Jed right now, so I can't check this out for myself:
Does the level that uses the cog you based your cog on use a different cmp than 01narsh? If so, you might check out the cmp that is right after it. If it redmap or something, then you need to count how many cmps from 01narsh.cmp the redmap is, and use that integer. (Like if it's 5 cmps down the list, use a 5 for your second integer.). If not, then I don't know.
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
Edward
10-04-2003, 02:23 AM
It is only one, and you seem to have forgotten what 16fall is... 16fall = 16 - The Falling Ship.
/Edward
DogSRoOL
10-04-2003, 11:31 AM
I know what level it is. What cmp does it use?
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
Edward
10-04-2003, 01:55 PM
<font face="Verdana, Arial" size="2">Originally posted by DogSRoOL:
I know what level it is. What cmp does it use?
</font>
Think... Why did LucasArts call the CMP files for 01narsh, 03home, 09fuel, etc.
Level 16 = 16fall.cmp
/Edward
DogSRoOL
10-04-2003, 02:22 PM
I know, but they sometimes used the same cmp for 2 (or sometimes even 3) levels. I wish I had a list (in the right order); I might be of more help.
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
[This message has been edited by DogSRoOL (edited October 04, 2003).]
Edward
10-04-2003, 02:53 PM
OK, sorry... Here's some help:
#name used
01narsh.cmp In NarShaddaa places
01redmap.cmp Red cosy NS places
01yellow.cmp Yellow team side of NS places
03house.cmp In the house places (seen only in 03)
04farm.cmp In the aqueducts places
06baron.cmp In the Baron levels ( http://forums.massassi.net/html/tongue.gif) (05 06, and 07 & 08 I think...)
09fuel.cmp In fuel places
10cargo.cmp When on the Cargo Ship
11pic.cmp For Gorc & Pic
12escape.cmp When escaping the Cargo Ship
12redmap.cmp I think, in the big reactor thingy...
15maw.cmp In the place before Maw and when Maw comes.
16fall.cmp In the falling cargo ship
16red.cmp For falling ship Red Alert
17sarris.cmp When fighting Sarris
19descent.cmp For Levels 18 & 19
20val.cmp For Boc & Jerec
/Edward
DogSRoOL
10-05-2003, 12:13 PM
Ok, here's what I'm trying to point out. Notice that 16red.cmp is right under 16fall.cmp. That's why the cog uses 0 (the current cmp) and 1 (the next cmp). Since you're using 01narsh.cmp, you'll have to use 13 instead of 1 to get to 16red.cmp. 0 will represent the level's master cmp, which cannot be changed via cog, as far as I know.
One potential problem is that 16red.cmp might be adaptive specifically for 16fall.cmp, so you might need to make a redmap for 01narsh... but I leave that for you to decide if it's neccessary or not.
Hope this helps. http://forums.massassi.net/html/biggrin.gif
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
[This message has been edited by DogSRoOL (edited October 05, 2003).]
Edward
10-07-2003, 12:07 AM
Well, I tried to set it for 13, but it crashed (simply because I didn't have a MAT 13). So I tried to set a MAT 13 (replace type1 with type13), but it still crashed!
And so I'm stuck...
Any experts out there?
/Edward
DogSRoOL
10-09-2003, 08:16 AM
Try replacing the variables with the numbers (instead of "[cmp]", at least in your mats).
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
Edward
10-09-2003, 11:05 AM
It did not work!
I set an i for 13 each on time, and set it for the cmp for sector. Then I added Sector in the SetColorMap.
Maybe I should send the level to someone to see what the problem is...
/Edward
DSLS_DeathSythe
10-11-2003, 10:54 PM
try this:
# See the inside of the tie from a screen!
#
# By Edward
flags=0x240
symbols
message startup
message activated
surface screen
thing cam
surface window0
surface window1
surface window2
surface window3
surface window4
surface window5
surface window6
surface window7
surface window8
sector room1
sector room2
sector hintSec1
sector hintSec2
material type0
material type1
int cmp=0 local
int z=0 local
end
#
code
startup:
SetColorMap(room1,GetColorMap(hintSec1[cmp]));
SetColorMap(room2,GetColorMap(hintSec1[cmp]));
for(z=0; z<9; z=z+1)
{
SetSurfaceMat(window0[z],type0[cmp]);
}
return;
activated:
if(GetSenderRef()!=screen) return;
If(cmp==0)
{
cmp=1;
SetCameraFocus(0,cam);
}
else
{
cmp=0;
SetCameraFocus(0,GetLocalPlayerThing());
}
SetColorMap(room1,GetColorMap(hintSec1[cmp]));
SetColorMap(room2,GetColorMap(hintSec1[cmp]));
for(z=0; z<9; z=z+1)
{
SetSurfaceMat(window0[z],type0[cmp]);
}
return;
endhintSec1 can be any sector that uses your master cmp, or the one you want the rooms to normally be.
hintSec2 needs to be a sector that has 01redmap.cmp as its colormap, if you dont have one normally in your level then just make a little one off in the middle of nowhere and give it that cmp.
i worked for me, hope it helps you.
------------------
Famous last words - "It seemed like a good idea at the time."
[This message has been edited by DSLS_DeathSythe (edited October 11, 2003).]
Edward
10-12-2003, 01:46 AM
IT WORKED! THANKS!
/Edward
------------------
AAAAAAAAHHH!
I'm addicted to the Computer!
AAAAAAAAHHH!
DogSRoOL
10-12-2003, 07:56 PM
Argh! That makes so much sense!
I feel so... inadequate... http://forums.massassi.net/html/frown.gif
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
lucky_jackpot
10-13-2003, 04:09 AM
Well geez - I leave you lot alone for a while and you can't sort out a simple problem... ; lol http://forums.massassi.net/html/smile.gif - I'm glad that we've got yet another of Edward's problems sorted http://forums.massassi.net/html/wink.gif Good going coggers http://forums.massassi.net/html/biggrin.gif
And DogSRoOL - so you had one "off-day" - there's always the rest of today and tomorrow yet to come http://forums.massassi.net/html/smile.gif http://forums.massassi.net/html/biggrin.gif
What's important at the end of the day is prolonging (and indeed keeping) the interest of JK alive and kicking - and with a strong backbone of coggers and editors alike (I say nothing about the precedence order there... http://forums.massassi.net/html/wink.gif ), then that's all that matters http://forums.massassi.net/html/biggrin.gif
-Jackpot
------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)
"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
Edward
10-13-2003, 05:47 AM
<font face="Verdana, Arial" size="2">Originally posted by DogSRoOL:
Argh! That makes so much sense!
I feel so... inadequate... http://forums.massassi.net/html/frown.gif
</font>
http://edward.leuf.org/eds_pics/edw.jpg
DogSRoOL
10-15-2003, 06:05 PM
It looks just like me! http://forums.massassi.net/html/biggrin.gif
I need to get a new copy of jk so I can start cogging again.
------------------
"The Just shall live by faith." - Galatians 3:11
I am DogSRoOL; Lord of the Onion Rings
The Giant Internet IC Masturbator (http://www.ionpool.net/arcade/giicm/GIICM.html)
[Anoying posts] + 1.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.