Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → It's almost scary.
It's almost scary.
2002-05-30, 9:47 AM #1
Grismath here, with yet another cog problem.

I downloaded and ran ParSec on this, and it did pick up quite a few smaller errors, as well as picking up some MotS commands (this is for MotS) as errors.

There is, however, the main, and more serious error of the cog not running at all (well, at least not WORKING), and the fact that when adj1 is passed, the game crashes and returns to Windows.

Without further ado, my latest dysfunctional brainchild...

Code:
# Rites of Xanthus TC Cog Script
# Mysteries of the Sith
#
# Infinity.COG
# 5.30.02
# -by Lord_Grismath (GrismathDynasty@hotmail.com)
#
# Description:
# 
#
# Instruction:
#
#   Simply create your level without any regard to thing count (but keep
# hallways and doors to about 200).  Then place this cog every two rooms,
# define all your Things and their Templates, and then delete the things.
# Run the level and voila, dynamically created Things based on the player's
# location.
#
# Set it up like so:
# 
#	Infinity Cog (starter)   *end of 1st cog*		Infinity Cog...
#  sec0       adj1		dadj1   |
# [rm0] -- | -- | -- [rm1] -- | -  *  - | -- [rm0]...
#        dadj0	sec1	     (adj0 of next cog)
#
#
# ** POINTS OF INTEREST AND EDITATION **
# (i.e. the numbers with the stars in front of them)
#
# 1.	  TakeSector, :P, I'm thinking that I'll have to send Genesis to
#	each individual pos vector, as there could (and probably will be)
#	more than one sector in the room. :[  This is, btw, dynamically
#	updated.
#
#
#
# 4.	  adj1 has been removed for redundancy issues.  It is controlled
#	by adj0 of the next cog.  Thing genesis has been removed for the
#	same reason.
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message	startup
message	crossed

message	user0

int		starter=0		// Is this the first cog in the set? (1=Yes/0=No)
int		ender=0		// Is this the last cog in the set? (1=Yes/0=No)
int		sec0=0		local	// Whether or not room 0  is loaded.
int		sec1=0		local	// The same for room 1
int		flag=80	local	// * NOTE: Check to see if this hex conversion is correct :P

surface		adj0			// These adjoins load the rooms beyond *4
surface		adj1
surface		dadj0			// In case the player wants to go back
surface		dadj1

sector		tsec	local		// *1 - TakeSector, the sector in which the things are created

thing		a0	local		// *2 - The dynamically created Things.  50 per room.
thing		a1	local		// 'a'-'e' for room 0, and 'f'-'k' for room 1.
thing		a2	local
thing		a3	local
thing		a4	local
thing		a5	local
thing		a6	local
thing		a7	local
thing		a8	local
thing		a9	local

vector		pa0			// World positional vectors for the dynamic things.
vector		pa1		
vector		pa2	
vector		pa3	
vector		pa4	
vector		pa5	
vector		pa6	
vector		pa7	
vector		pa8	
vector		pa9	

vector		la0			// Look vectors for the things.
vector		la1	
vector		la2	
vector		la3	
vector		la4	
vector		la5	
vector		la6	
vector		la7	
vector		la8	
vector		la9	

template	ta0			// Templates for the things.
template	ta1	
template	ta2	
template	ta3	
template	ta4	
template	ta5	
template	ta6	
template	ta7	
template	ta8	
template	ta9	


thing		f0	local		// *3 - Room 1's Things.  (10 , 'f' only, for now)
thing		f1	local		// 'f'-'e' for room 0, and 'f'-'f' for room 1.
thing		f2	local
thing		f3	local
thing		f4	local
thing		f5	local
thing		f6	local
thing		f7	local
thing		f8	local
thing		f9	local

vector		pf0			// World positional vectors for the dynamic things.
vector		pf1		
vector		pf2	
vector		pf3	
vector		pf4	
vector		pf5	
vector		pf6	
vector		pf7	
vector		pf8	
vector		pf9	

vector		lf0			// Look vectors for the things.
vector		lf1	
vector		lf2	
vector		lf3	
vector		lf4	
vector		lf5	
vector		lf6	
vector		lf7	
vector		lf8	
vector		lf9	

template	tf0			// Templates for the things.
template	tf1	
template	tf2	
template	tf3	
template	tf4	
template	tf5	
template	tf6	
template	tf7	
template	tf8	
template	tf9	


cog		infmaster_cog

int		devmode=0	local
int		X=0		local

thing		player		local

end

# ========================================================================================

code

# ........................................................................................

killflagged:

For(X=0; X<=GetThingCount(); X=X+1) {
	if(GetThingFlags(X) == flag) {
	DestroyThing(X);	
	}
}

// Destroys things generated by this cog, i.e. with the defined flag.

return;

# ........................................................................................

startup:

player=GetLocalPlayerThing();
if(starter == 1) {
	// Clean the slate of any flagged objects just in case.
	call killflagged;
	For(X=0; X<10; X=X+1) {
		Create the things for room 0.
		tsec = FindSectorAtPos(pa[X]);
		a0[X] = CreateThingAtPos(ta[X], tsec, pa[X], la[X]);
		SetThingFlags(a0[X], flag);
	}
	// Only set the variable AFTER the things have been created. :]
	sec0 = 1;
	if(devmode==1) {
		print("Starting Room Initialised.");
	}
}

return;

# ........................................................................................

user0:

//Sent from the infmaster.cog
devmode=1;
SendMessage(infmaster_cog, user0);

if(ender == 1) {
	SendMessage(infmaster_cog, user1);
}

return;

# ........................................................................................

crossed:

if(GetSenderRef() == adj0) {
	//If this isn't the starter cog of the set... load room 0
	if(starter != 1) {
	if(sec0 != 1) {
		// Destroy all things in room 1 of the last cog.
		call killflagged;
		For(X=0; X<10; X=X+1) {
			//Create the things for room 0.
			tsec = FindSectorAtPos(pa[X]);
			a0[X] = CreateThingAtPos(ta[X], tsec, pa[X], la[X]);
			SetThingFlags(a0[X], flag);
		}
		sec0=1;
		sec1=0;
		if(devmode==1) {
			print("Loaded.");
		}
	}
	}
}
if(GetSenderRef() == adj1) {
	//Load room 1 if it hasn't been done so already.
	if(sec1 != 1) {
		// Destroy all things in room 0.
		call killflagged;
		For(X=0; X<10; X=X+1) {
			//Create the things for room 1.
			tsec = FindSectorAtPos(pf[X]);
			f0[X] = CreateThingAtPos(tf[X], tsec, pf[X], lf[X]);
			SetThingFlags(f0[X], flag);
		}
		sec0=0;
		sec1=1;
		if(devmode==1) {
			print("Loaded.");
		}
	}
}
if(GetSenderRef() == dadj0) {
	//In case the player decides to go back to room 0...
	if(sec0 != 1) {
		// Destroy all things in room 1.
		call killflagged;
		For(X=0; X<10; X=X+1) {
			//Re-create the things for room 0.
			tsec = FindSectorAtPos(pa[X]);
			a0[X] = CreateThingAtPos(ta[X], tsec, pa[X], la[X]);
			SetThingFlags(a0[X], flag);
		}
		sec0=1;
		sec1=0;
		if(devmode==1) {
			print("Loaded.");
		}
	}
}
if(GetSenderRef() == dadj1) {
	//Load room 1 if it hasn't been done so already.
	if(sec1 != 1) {
		// Destroy all things created by the next cog.
		call killflagged;
		For(X=0; X<10; X=X+1) {
			//Re-create the things for room 1.
			tsec = FindSectorAtPos(pf[X]);
			f0[X] = CreateThingAtPos(tf[X], tsec, pf[X], lf[X]);
			SetThingFlags(f0[X], flag);
		}
		sec0=0;
		sec1=1;
		if(devmode==1) {
			print("Loaded.");
		}
	}
}

return;


# ........................................................................................

end


Help plz?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 9:50 AM #2
Oh, right, can't forget the master cog, as the problem might lie therein as well.

This one's a bit shorter. [http://forums.massassi.net/html/wink.gif]

Code:
# Rites of Xanthus TC Cog Script
# Mysteries of the Sith
#
# InfMaster.COG
# 5.30.02
# -by Lord_Grismath (GrismathDynasty@hotmail.com)
#
# Description
#  
#   The master Infinity cog.
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message	startup
message	user0
message	user1

cog		infinity=0

int		devmode=0			//Toggle developer mode (1=On/0=Off)
int		cognum=0	local
int		collected=0	local

end

# ========================================================================================

code

# ........................................................................................

startup:

//If devmode is on, tell this to the other cogs.

if(devmode == 1) {
	SendMessage(infinity_cog, user0);
	print("Welcome to Infinity Cog Developer v. 1.0");
}

return;

# ........................................................................................

user0:

if(collected != 1) {
	cognum=cognum+1;
}

return;

# ........................................................................................


user1:

print("Number of Infinity Cogs Placed:");
print(cognum);

collected = 1;

return;

# ........................................................................................

end
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 10:17 AM #3
Making your own version of the TVTCS, are you? [http://forums.massassi.net/html/biggrin.gif]

A problem I encountered when I first started, is that 'Getthingcount()' doesnt actully count the things in the level. Since you ARE capturing the thing values as you create them, just run a loop removing everything in the 'Ax' series... Just be sure to set their values to -1 on startup, and check to make sure they arent such before you destroy them.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 12:17 PM #4
If you want, Ill email you the latest versions of a basic trigger and object generator from the TVTCS (thoroughly commented, of course) . . . not to use, but to understand my approach to the problem.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.

[This message has been edited by GBK (edited May 30, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 2:04 PM #5
'Ladies and gentlemen, this is a revolutionary new concept, thought up entirely by me. SOmething I like to call the... erm... 'XVTCS', or Xanthus Vector Thing Creation System...' [http://forums.massassi.net/html/wink.gif]

j/k

[http://forums.massassi.net/html/biggrin.gif] Exactly, GBK. Thanks a lot. And I work strictly on the honour system. As you saw, I was very interested in the TVTCS, and so I began experimenting with my own version. This is for MotS, and I'm assuming your level is for JK.

I'd love to take a look at your code, and as I said, I give you my word that I won't just copy it (I'll paste it too, [http://forums.massassi.net/html/wink.gif], j/k).

Thank you for the help, and my e-mail is GrismathDynasty@Hotmail.com.

Quote:
<font face="Verdana, Arial" size="2">removing everything in the 'Ax' series</font>


Well, note the 'killflagged' message, destroying all things with the flag, which is set to the dynamically generated things via SetThingFlags.

Also...

Quote:
<font face="Verdana, Arial" size="2">Just be sure to set their values to -1 on startup</font>


Do you mean that I should de-localise the things (the a series) or that I should make them integers?

Finally, I read your notes on hexadecimal conversion into integer form, and tried to do so myself, with the 0x80 flag (unused #7, I believe), and the calculator returned '80', is this correct?

Thanks again,
-Grismath
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 2:36 PM #6
Umm, no, the dec form of the hex value 0x80 is 128.


Ill send you those cogs in a few mins... (They arent yet commented . . . I never comment cogs unless I intend for someone to read them.... [http://forums.massassi.net/html/wink.gif] )

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 2:55 PM #7
I'd like to know when either the TVTCS or the XVTCS system will be released? I'd prefer not to split my complicated level (MOTS) in half but I've hit the thing limit.
Thanks [http://forums.massassi.net/html/smile.gif]

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2002-05-30, 3:27 PM #8
Ahhh... MotS, eh? I think that's more of my realm. Most of these ppl here are diehard JKers.

MotS: The Wave of the Future... in 1998 [http://forums.massassi.net/html/biggrin.gif]

Erm... Look towards early July at the latest, maybe.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 3:33 PM #9
Quote:
<font face="Verdana, Arial" size="2">
A problem I encountered when I first started, is that 'Getthingcount()' doesnt actully count the things in the level. Since you ARE capturing the thing values as you create them, just run a loop removing everything in the 'Ax' series... Just be sure to set their values to -1 on startup, and check to make sure they arent such before you destroy them.

</font>


Ohhhhhhhhh...[/i]

/me understands.

Will do.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 3:37 PM #10
The tvtcs should work just fine in MOTS too..

BTW, Grismath, check your mail.. [http://forums.massassi.net/html/wink.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 3:39 PM #11
BTW, Ill release the tvtcs after my SP level. Which should be sometime next spring... [http://forums.massassi.net/html/frown.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 3:39 PM #12
Alright, I fixed and modified the 'killflagged' command. It still works for both rooms, and as I add more series, I'll add their corresponding deletion lines into this. I was to check for/delete all series things in case there are any extras or extraneous flagged things.

Code:
killflagged:

For(X=0; X<10; X=X+1) {
	tflag = GetThingFlags(a[X]);
	if(tflag != flag) {
		DestroyThing(a[X]);	
	}
	tflag = GetThingFlags(f[X]);
	if(tflag != flag) {
		DestroyThing(f[X]);	
	}
}

// Destroys things generated by this cog, i.e. with the defined flag.

return;


I hope that's right. [http://forums.massassi.net/html/redface.gif]

I'll try testing this a bit later, and should the thing series be defined in the Symbols as things or as ints? If they're ints, I'm assuming I should set them as -1 by default?

[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 3:42 PM #13
Things, ints, doesnt matter. Set 'em to -1 anyway...


Youll see a better answer in my example.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 3:43 PM #14
Well... [http://forums.massassi.net/html/tongue.gif] Mine'll prolly be MotS only, so you've got a big opening there, plus you're cog will probably by 20x better than mine. [http://forums.massassi.net/html/smile.gif]

But for MotS however, I'm sure I'll work playeraction into there somewhere...

/me cackles


Oh, and I got ur e-mail, I'll read this.

[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 3:51 PM #15
[http://forums.massassi.net/html/eek.gif] OMG

Code:
JKstringconcatasciistring();


It's times like these that I think LEC went a bit overboard with their commands. Must've been made by Germans, [http://forums.massassi.net/html/wink.gif].

The one other thing I hate about your cogs is that when I read them, there are absolutely no spaces or lines.

Do you make these in Notepad with WordWrap or something?!?! [http://forums.massassi.net/html/smile.gif]

And seeing this, TVTCS is going to completely blow 'XVTCS' (original title forthcoming) out of the water. [http://forums.massassi.net/html/biggrin.gif] My only hope is to baffle you with Playeractions and other MotS-specific commands and release it first.

However, we aren't competeing or anything... *PASTE* [http://forums.massassi.net/html/smile.gif]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:00 PM #16
GBK, in reading this, your... 'S_Pos' Sectors can be eliminated by my 'takesector' function.

/me reads on.

AH-HA! So I should make the things (for tracking purposes) integers. Gotcha, will do.

/me continues reading.

Nice debugging systems and failsafes, btw. [http://forums.massassi.net/html/smile.gif]

EDIT:

NOOOOOOooooo... I had a whole page of comments, [http://forums.massassi.net/html/tongue.gif], but IE crashed. Well, this has given me quite a few ideas, I guess I'll get back to work. Thanks for the help, and that's one great cog. [http://forums.massassi.net/html/biggrin.gif]


[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:12 PM #17
The verb 'Findsectoratpos()' doesnt exist in JK . . . so it is impossible for me to use your method.. [http://forums.massassi.net/html/frown.gif]


I worked with siefer and Sabermaster awhile back to find a way to do it mathematically in JK... The formula we came up with works like a charm, but it is very processor intensive, so I didnt use it.


Im glad you approve. [http://forums.massassi.net/html/tongue.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 4:25 PM #18
As you very well should be... [http://forums.massassi.net/html/cool.gif]

And now that I look at it, the lettered arrays aren't even necessary are they? [http://forums.massassi.net/html/tongue.gif]

/me feels stupid

ints a0 - a50 should work, right?

I'm also utilising your 'used' method, much much more stable.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:31 PM #19
Auto-counts gave me trouble noend when I started my sytem, so I dropped them for the simpler method of a int. The only problem is, it is easy to forget to update that number when you add objects... [http://forums.massassi.net/html/frown.gif]

Yep, long lists of ints should work fine. They do for me. [http://forums.massassi.net/html/tongue.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 4:31 PM #20
Well, even if a0-50 works, I'll use a for rm 0 and f (0-50) for rm1. [http://forums.massassi.net/html/tongue.gif]

Here's the updated cog:

Code:
Maybe not the best idea.... check you e-mail, GBK.


[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:35 PM #21
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Lord_Grismath:
The one other thing I hate about your cogs is that when I read them, there are absolutely no spaces or lines.

Do you make these in Notepad with WordWrap or something?!?! [http://forums.massassi.net/html/smile.gif]
</font>



An old bad habbit. I actully find it more difficult to read spaced code than mine... [http://forums.massassi.net/html/frown.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.

[This message has been edited by GBK (edited May 30, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 4:37 PM #22
Ok, from now on, my code will look like...

Code:
killflagged:For(X=0; X<used_a; X=X+1) {tflag = GetThingFlags(a[X]);if(tflag != flag) {DestroyThing(a[X]);a0[X] = -1;}}


that.
[http://forums.massassi.net/html/biggrin.gif]

Check ur mail... Now.

[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:42 PM #23
LMAO. Next thing I see, will be you using Stop in place of Return.... [http://forums.massassi.net/html/biggrin.gif]


Cogs recieved...

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 4:42 PM #24
Wowwwww.... I tried to test the level, and now the game crashes as soon as the level loads instead of as soon as adj1 is passed!

Even better!

/me cries

[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:45 PM #25
Never, you Stop; Rebel!

GAH, stupid IE. Well, here's a screen of my demo level (45 min or less, more rooms):

[http://atg.hospin.com/Images/rox/inf_demo1.jpg]

[This message has been edited by Lord_Grismath (edited May 30, 2002).]

[This message has been edited by Lord_Grismath (edited May 30, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-30, 4:48 PM #26
if(tflag != flag) {

Umm, you should be checking for equality, not inquality... [http://forums.massassi.net/html/wink.gif]


In other words,

if(tflag == flag) {

On ther other hand, you could drop this method altogether, and simply destroy the object directly.

IE,

If(a[X] != -1) DestroyThing(a[X]);

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-30, 4:50 PM #27
Yeah, ur right. I'm not relying on that flag system as much anymore anyway, [http://forums.massassi.net/html/tongue.gif].

Well, I'm off to bed, I'll work on this more tomorrow. Thanks for the help again.

We sure posted a lot. [http://forums.massassi.net/html/biggrin.gif]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-31, 12:23 AM #28
Since I'm no longer using the GetThingCount command, I might as well take your advice about simply deleting ALL a and f series without checking for flags, since none of the things would be defined in the cog without the flags anyway, as when they're creatd they're assigned the flags. But even that may prove to be redundant.

Here's the updated killflagged message AGAIN. [http://forums.massassi.net/html/smile.gif]

Code:
killflagged:

For(X=0; X<used_a; X=X+1) {
	//tflag = GetThingFlags(a[X]); Removed the takeflag method, less reliance on flags
	If(a[X] != -1) {
		DestroyThing(a[X]); 	
		a0[X] = -1;	// Total Thing genocide, I even purged the variable :]
	}
}
For(X=0; X<used_f; X=X+1) {
	//tflag = GetThingFlags(f[X]);
	If(f[X] != -1) {
		DestroyThing(f[X]);
		f0[X] = -1;
	}
}

// Destroys things generated by this cog, i.e. with the defined flag, using the takeflag
// (That is, if the things are actually flagged as 0x80)

return;


[This message has been edited by Lord_Grismath (edited May 31, 2002).]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-31, 4:01 AM #29
Very good, grasshopper... [http://forums.massassi.net/html/biggrin.gif]


Just a thought... You could remove some of your variables, by doing the following;

a0[X] = Createthingatpos(ta[X], Findsectoratpos(pa[X]), pa[X], la[X]);


Instead of finding the sector beforehand, do it as you create the object... One less variable!

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-31, 7:03 AM #30
...but WHY?!?!??!!

*sigh*

I'll get to it. :P
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-05-31, 9:08 AM #31
Hmmmm, so where do I enroll in COG College? [http://forums.massassi.net/html/wink.gif]

My MOTS level won't be done before July, but I certainly hope it is done before next spring. 'Cause I want to start on my second MOTS level! [http://forums.massassi.net/html/smile.gif]

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2002-06-01, 1:43 AM #32
Eh... don't worry about it, at least for the Vector Creation Systems, we'll make a few announcements when we're ready for public use.

...I just gotta be able to START the LEVEL with the cog first. [http://forums.massassi.net/html/wink.gif]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-06-01, 4:27 AM #33
Comment out all the Deatroything commands, and test the level. If it works, add them one-by one until you find the culprit.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-05, 3:28 PM #34
Erm...

Code:
killflagged:

For(X=0; X<used_a; X=X+1) {
	//tflag = GetThingFlags(a[X]); Removed the takeflag method, less reliance on flags
	If(a[X] != -1) {
		DestroyThing(a[X]); 	
		a0[X] = -1;	// Total Thing genocide, I even purged the variable :]
	}
}
For(X=0; X<used_f; X=X+1) {
	//tflag = GetThingFlags(f[X]);
	If(f[X] != -1) {
		DestroyThing(f[X]);
		f0[X] = -1;
	}
}

// Destroys things generated by this cog, i.e. with the defined flag, using the takeflag
// (That is, if the things are actually flagged as 0x80)

return;


... one by one, you say?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-06-05, 3:32 PM #35
Does the level load, then crash? Or does it give an error message and not load?

If it loads & crashes, comment out the destroythings, otherwise it isnt the cog.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-06, 2:04 AM #36
It loads then crashes.

I'll comment out the call killflagged messages one by one.

The level works fine w/o the cog.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-06-06, 7:19 AM #37
You're not using arrays correctly - that's why JK is crashing. Remember, Cog does not use a true array system; instead, it uses a type of 'variable offset'. My array tutorial is included in the DataMaster. [http://forums.massassi.net/html/smile.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-10, 2:11 AM #38
Errr... sorry to bring this back up, but I read the tutorial, and that's exactly what i've been doing :P. Want to take a look at the latest version, SaberMaster?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-06-10, 4:10 AM #39
Yes, post the updated code, and I'll take a look. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!