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 → Is there ever a time where I haven't had problems?
Is there ever a time where I haven't had problems?
2004-10-10, 11:57 AM #1
Maybe...

This teleporter isn't working... I activate switch and it won't teleport...

Code:
# Teleport Back
#
# By Edward
symbols

message		activated
message		timer

thing		goto		linkid=1
surface		switch0		linkid=2
surface		switch1		linkid=2
surface		switch2		linkid=2
surface		switch3		linkid=2
surface		switch4		linkid=2
surface		switch5		linkid=2
surface		switch6		linkid=2
surface		switch7		linkid=2
surface		switch8		linkid=2
surface		switch9		linkid=2
surface		switch10	linkid=2
surface		switch11	linkid=2
surface		switch12	linkid=2
surface		switch13	linkid=2
surface		switch14	linkid=2
surface		switch15	linkid=2
surface		switch16	linkid=2
surface		switch17	linkid=2
surface		switch18	linkid=2
surface		switch19	linkid=2
surface		switch20	linkid=2
surface		switch21	linkid=2
surface		switch22	linkid=2
surface		switch23	linkid=2
surface		switch24	linkid=2
surface		switch25	linkid=2
surface		switch26	linkid=2
surface		switch27	linkid=2
surface		switch28	linkid=2
surface		switch29	linkid=2
surface		switch30	linkid=2
surface		switch31	linkid=2

template	disappearing
template	appearing

sound		disapperating
sound		apperating

end
#
code
activated:
	if(GetSenderID()!=2) return;
	CreateThing(disappearing,GetSourceRef());
	PlaySoundPos(disapperating,GetThingPos(GetSourceRef()),1,-1,-1,0x0);
	DetachThing(GetSourceRef());
	SetThingVel(GetSourceRef(),'0 0 1');
	SetTimerEx(.1,10,GetSourceRef(),0);
return;
timer:
	StopThing(GetParam(0));
	TeleportThing(GetParam(0),goto);
	CreateThing(appearing,GetParam(0));
	PlaySoundPos(apperating,GetThingPos(GetParam(0)),1,-1,-1,0x0);
return;
end


/Edward

PS.
These unauthorized NewLines are the doings of this forum...
Edward's Cognative Hazards
2004-10-10, 2:28 PM #2
Is anything else working? Sounds, upward velocity?

Sorry, can't test at the moment.
May the mass times acceleration be with you.
2004-10-10, 2:42 PM #3
Nope, nada, and no...
Edward's Cognative Hazards
2004-10-10, 3:52 PM #4
Rename the variable goto into something else. It is possible that JK uses goto as a reserved word.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-10-11, 12:32 PM #5
OK... That worked... This needs to be put into the Parsec! Oh, GBK!

/Edward
Edward's Cognative Hazards
2004-10-11, 2:50 PM #6
^^^ and the DM. You have a witness...

[edit] Did a small test, and "goto" works exactly the same as "call".
So, just as Stop and Return are interchangeable, so are goto and call.
May the mass times acceleration be with you.
2004-10-11, 4:01 PM #7
I have often wondered why people don't make more use of functions such as call and goto. Code could be set up such as...
Code:
activated:
MoveToFrame(bob, went, there);
WaitForStop(bob);
billy:
print("have a nice day");
return;

crossed:
call billy;
return;

allowing people to bypass certain lines of code. There are many different ways to do it, but I'm surprised that this isn't used more often.


Dang, just realized how far off topic I went. Sorry. [/rant]
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"

↑ Up to the top!