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 → Either Parsec is broken...
Either Parsec is broken...
2004-04-09, 1:19 AM #1
...or, I've hit the COG limit.

Cog nr 119 in the Placed Cogs window.
Code:
# Teleport by Surface
#
# By Edward
symbols

message		activated

surface		surf

thing		goto

template	magic

sound		teling

end
#
code
startup:
	SetWallCel(surf,0);
	sleep(1);
	print("Aye?");
return;
activated:
	if(GetSenderRef()!=surf) return;
	if(GetWallCel(surf)==1) return;
	SetWallCel(surf,1);
	print("Aye!");
	CreateThing(magic,GetSourceRef());
	CreateThing(magic,goto);
	PlaySoundThing(teling,GetSourceRef(),1,-1,-1,0x0);
	PlaySoundThing(teling,goto,1,-1,-1,0x0);
	sleep(0.1);
	TeleportThing(GetSourceRef(),goto);
	sleep(1);
	SetWallCel(surf,0);
return;
end

The surface exists, the destination exists, is in a sector, template does exist, and so does the sound. So tell me... WHAT'S THE PROBLEM???

/Edward
Edward's Cognative Hazards
2004-04-09, 5:17 AM #2
Its not a cog limit - Ive seen levels with far more placed cogs. . . . does it print anything?

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-04-09, 9:18 AM #3
Eh... No!
Edward's Cognative Hazards
2004-04-10, 5:57 AM #4
I. Hate. sleep().
I. FEAR. sleep().
SLEEP() == THE DARKSIDE.

Might not be the prob, since the startup message doesn't work, and it's only one sleep() (and JK can handle 5).
BUT, it's the only thing I see wrong here (at the moment), so try timers.

------------------
Bond, Power, CA, The Force, Saber, IC, Epic, Oily Mexican Food, BG, /\ |> /\ /\/\, Sentences.
Now you know where I've been.
May the mass times acceleration be with you.
2004-04-10, 6:29 AM #5
OK, startup (which noone saw) didn't exist. Added, still nothing!
Sleep()=darkside? Then so be it... SLAW... *tries to fry Darth Slaw with lightning, but ends up cooking Coal Slaw...*
Anyway, I changed all sleeps into TimerEx. Here's an Update:
Code:
# Teleport by Surface
#
# By Edward
symbols

message		startup
message		timer
message		activated

surface		surf

thing		goto

thing		player		local

template	magic

sound		teling

end
#
code
startup:
	SetTimerEx(1,10,0,0);
return;
activated:
	if(GetSenderRef()!=surf) return;
	if(GetWallCel(surf)==1) return;
	SetWallCel(surf,1);
	print("Aye!");
	player=GetSourceRef();
	CreateThing(magic,GetSourceRef());
	CreateThing(magic,goto);
	PlaySoundThing(teling,GetSourceRef(),1,-1,-1,0x0);
	PlaySoundThing(teling,goto,1,-1,-1,0x0);
	SetTimerEx(.1,20,0,0);
return;
timer:
	if(GetSenderID()==10)
	{
		SetWallCel(surf,0);
		sleep(1);
		print("Aye?");
	}
	else if(GetSenderID()==20)
	{
		TeleportThing(player,goto);
		SetTimerEx(1,30,0,0);
	}
	else if(GetSenderID()==30)
	{
		SetWallCel(surf,0);
	}
return;
end

Still nothing... WAAAAAAAAA!

/Edward
Edward's Cognative Hazards
2004-04-11, 1:43 AM #6
Comment out everything but the printed statements, and see if it works. If it does, start uncommenting it one verb at a time till you find the culprit.

------------------
I used to believe that we must fight the future, lest change come without our consent. I was wrong. The truth is that we must embrace the future, for only with change can we remain the same.
And when the moment is right, I'm gonna fly a kite.
2004-04-11, 2:44 AM #7
FOUND IT! PlaySoundThing(teling,goto,1,-1,-1,0x0);
Now then... WHY!?

Did some more, and isolated it to Thing Goto. Why? I tried renaming it to gotothething, didn't work.

OK, renamed it to theplacetobe. Worked! But I'd still like to know why goto wasn't an option?

[This message has been edited by Edward (edited April 11, 2004).]
Edward's Cognative Hazards

↑ Up to the top!