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 → can someone write me a transporter cog?
can someone write me a transporter cog?
2002-06-29, 12:36 PM #1
I need a cog for an MP cooperative I'm working on so that when you pass an adjoin, you get teleported to 1 of 5 ghost positions.
Thanks in advance, please put your name in the cog header so i remember to put your name in the readme.

------------------
Last week I cudn't evn spel grajuat, but now I is one.
2002-06-29, 3:49 PM #2
Code:
#06/2002 GBK
Symbols
Message Crossed
Surface Adjoin
Thing Ghost0
Thing Ghost1
Thing Ghost2
Thing Ghost3
Thing Ghost4
End
Code
Crossed:
Teleportthing(Getsourceref(), Ghost0[Rand()*5]);
Stop;
End


Enjoy...

------------------
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 June 29, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-06-29, 4:09 PM #3
Thank you.
I really should learn to write my own cogs.

------------------
Last week I cudn't evn spel grajuat, but now I is one.
2002-06-29, 4:57 PM #4
OK, i just tested it and it doesn't work.
When i walk into the specifie adjoin i start falling(even though there is a floor there) and it HOMS. I've tried changing the adjoin and ghost positions but it still does it.
Also, could someone help me with my first cog, it won't print the message.
Code:
# Jedi Knight Cog Script
#
# THINGTEXT.COG
#
# This will display a text message when a thing is activated
#
#
# Made by Stormtrooper
#
#
# This Cog is Not supported by LucasArts Entertainment Co

Symbols
Message activated
Thing thing0
End
Code
activated:
Print(Sorry, this part of the bar is under construction, you may not enter.");
Stop;
End

do i have to use something other than Print?

------------------
Last week I cudn't evn spel grajuat, but now I is one.


[This message has been edited by Stormtrooper (edited June 29, 2002).]
2002-06-29, 5:22 PM #5
1) My cog works fine for me. Check your ghosts, make sure their sector values are correct (or, alternativly, press F10 in JED).

2) You cog doesnt work because you have an un-terminated string. The text in print should have quotes on bolth sides......

------------------
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-29, 5:55 PM #6
Hmmmm...I still can't get the transportating cog to work, all the ghosts are in the specified sector, there are no errors in the consistency checker, but I still get HOM when I pass the adjoin.
Here is what I have specified in the COG
Adjoin=24 29
Ghost0=15
Ghost1=16
Ghost2=17
Ghost3=18
Ghost4=19
All the ghosts have thingflags of 0x400 (used in cog)
and the surface
adjoin flags=7
surf flags=2
face flags=4
Oh, thanks for the help on my cog.

------------------
Last week I cudn't evn spel grajuat, but now I is one.
2002-06-30, 1:48 AM #7
Make sure the ghosts are not on an adjoin, because that sometimes causes troubles.

And make sure the ghosts are at a certain range from the floor, else the player would get spawned in the floor.

I hope that helps.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-06-30, 1:50 AM #8
I know it isnt the cog, because I tested it. It works fine for me. Remove the extraneous thingflags from the ghosts, and try it again.


Your welcome. [http://forums.massassi.net/html/smile.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-06-30, 1:56 AM #9
THANK YOU!!!!!
removing the thingflags on the ghosts and it worked.
one more question, would adding this
Code:
template	sparks=+telesparks		local
sound		teleportsnd=ForceThrow01.WAV	local

dummy = CreateThingAtPos(sparks, GetThingSector(GetSourceRef()), GetThingPos(GetSourceRef()), '0 0 0');
dummy = PlaySoundThing(teleportsnd, GetSourceRef(), 1.0, -1, -1, 0x80);

make it create the sparks and sound?

------------------
Last week I cudn't evn spel grajuat, but now I is one.

[This message has been edited by Stormtrooper (edited June 30, 2002).]
2002-06-30, 7:43 AM #10
Bleh.

Code:
#06/2002 GBK
Symbols
Message Crossed
Surface Adjoin
Thing Ghost0
Thing Ghost1
Thing Ghost2
Thing Ghost3
Thing Ghost4
Template Sparks
Sound Teleportsnd
End
Code
Crossed:
Teleportthing(Getsourceref(), Ghost0[Rand()*5]);
Creatething(Sparks, Getsourceref());
Playsoundthing(Teleportsnd, Getsourceref(), 1, 0, 10, 0);
Stop;
End


------------------
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.

↑ Up to the top!