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 → Teleportation
Teleportation
2001-12-30, 8:09 PM #1
I need a simple cog that when you walk into a specified sector it teleports you to a ghost position [http://forums.massassi.net/html/wink.gif]
Cha cha cha CHIA!!
2001-12-31, 5:53 AM #2
I donno, that might be kinda hard. I not sure if its even possible.... [http://forums.massassi.net/html/wink.gif]

 

Code:
#12/2001 GBK
Symbols
Message Entered
Sector Target
Thing Ghost
Thing Player  Local
End
Code
Entered:
Player = JKgetlocalplayer();
If(Getsenderref() != Target || Getsourceref() != Player) Stop;
Teleportthing(Player, Ghost);
Stop;
End


 


FTN:
Very basic stuff here. Upon reception of the 'Entered' message, it checks to see if it was the target sector being entered by the player. If so, it teleports the player to the ghost position.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-31, 12:49 PM #3
when I past it in notepad it goes sideways it doesn't go down I need help [http://forums.massassi.net/html/wink.gif]
Cha cha cha CHIA!!
2001-12-31, 1:51 PM #4
Sure its possible GBK! I use this one and it works perfect!

Code:
#
# Teleports the player to a ghost position upon entry into a sector 
#
# Nightmare (6/16/98)
#============================================================================
flags=0x240

symbols
message entered
message startup        

sector	telechamber

thing	gotospot
                                
int 	player  		                local
int     dummy                                   local

sound   telesound=ForceThrow01.WAV

template	sparks=+telesparks

end

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

code
entered:
	player=GetLocalPlayerThing();
	StopThing(player);	

	dummy = CreateThing(sparks, player);
        
        dummy = PlaySoundLocal(telesound, 1.0, 0, 0);
        
        TeleportThing(player, gotospot);

	dummy = CreateThing(sparks, player);

	return;
end


As to copy and pasting, I use to have that problem. I dunno how I fixed it though. Try getting Cog Writer though. Should be a program that you can download here at Massassi.
In my mind I can see your face, as Your love pours down in a shower of grace. Some people tell me that Your just a dream, but my faith is the evidence of things unseen.

Once upon a time God spoke to me, and then I was never the same again.

_-=MaTRiX=-_

↑ Up to the top!