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 → Modified Rail Det Cog
Modified Rail Det Cog
2002-04-21, 10:10 AM #1
Ok, here is what I need. Is there a way to make a Rail Detanator Missile thingy shoot at a player as long as he is in certain sectors, say like sectors 200-220? I need to make this thing recognize that the player is close to the sector before entering it, so that the missiles will begin to shoot right before he walks into the sector. Is this possible? Thanks

-xavier
Stand firm in your faith, or you will not stand at all. -Isaiah 7:9
2002-04-21, 2:37 PM #2
If you're using Mots, open up jkm.goo file (in the episode folder) in conman/cage. Find a cog called s5l2_lightning. When placed in a level, if the player crosses an adjoin, it starts shooting lightning across two ghost objects at a certain interval. Just set the template for 'lightning' to whatever the raildet template is. I'd post it, but might get flak since it's mots and people could put it in JK. If you're using JK, i don't know what to tell you... Hope this helps, though.

------------------
"We've compiled 43 songs on one CD... But it's a big one... And it's made outta chocolate!"

- Ryan Stiles of 'Whose Line Is It Anyway?'
2002-04-21, 3:41 PM #3
I say, to hell with the MOTS code, and write your own.

Code:
#04/2002 GBK - Packman573@aol.com
Symbols
Message Startup
Message Pulse
Thing Ghost
Template Type
Sound Fire_sound
Template Walk_player=walkplayer	Local
Sector Zone
Flex Pulse_rate=0.5
Int I=0			Local
End
Code
Startup:
Sleep(0.5);
Setpulse(Pulse_rate);
Stop;
Pulse:
For(I=0;I<=Getthingcount();I=I+1) 
If(Getthingtemplate(I) == Walk_player && Getthingsector(I) == Zone) {
Setthinglook(Ghost, Vectorsub(Getthingpos(I), Getthingpos(Ghost)));
FireProjectile(Ghost, Type, Fire_sound, 18, '0 0 0', '0 0 0', 1.0, 0x20, -1, -1); }
Stop;
End


I think the variables are self-explanitory, so I wont bother. It should work in MP...

------------------
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-04-22, 3:37 AM #4
Wow. GBK that cog works better than I expected. Its great! Only problem I have found with it, is that it is too smart. I just simply need it to shoot straight ahead from its ghost. Instead it has been tracking the player to a point. Is there anyway to make these rockets stupid without causing you to much trouble? Thanks,

-xavier
Stand firm in your faith, or you will not stand at all. -Isaiah 7:9
2002-04-22, 6:42 AM #5
Hrm. Umm. Ok...

Code:
# Quick & Dirty MP turrent, with 'stupifying' option....
#
# 04/2002 GBK - Packman573@aol.com
Symbols
Message Startup
Message Pulse
Thing Ghost
Template Type
Sound Fire_sound
Template Walk_player=walkplayer	Local
Sector Zone
Flex Pulse_rate=0.5
Int Track_player=0			#Automatically aim at the victem? 0 = no.
Int I=0			Local
End
Code
Startup:
Sleep(0.5);
Setpulse(Pulse_rate);
Stop;
Pulse:
For(I=0;I<=Getthingcount();I=I+1) 
If(Getthingtemplate(I) == Walk_player && Getthingsector(I) == Zone) {
If(Track_player != 0) Setthinglook(Ghost, Vectorsub(Getthingpos(I), Getthingpos(Ghost)));
FireProjectile(Ghost, Type, Fire_sound, 18, '0 0 0', '0 0 0', 1.0, 0x20, -1, -1); }
Stop;
End



Instead of making it permently stupid, I made it an option... [http://forums.massassi.net/html/biggrin.gif]

Credit me...

------------------
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-04-22, 6:47 AM #6
lol. sorry that line of code "# Quick & Dirty MP turrent, with 'stupifying' option...." struck me as funny. Anyways, thanks. I will try it out once I get home. Right now i am at school.

-xavier
Stand firm in your faith, or you will not stand at all. -Isaiah 7:9
2002-04-22, 4:32 PM #7
It did not work. I put the cog in notepad and saved it as stupid.cog, but alas, it would not work. Basically when I opened it up using f7 in jed, it did not give me any spaces for which to put the values in.

-xavier
Stand firm in your faith, or you will not stand at all. -Isaiah 7:9
2002-04-22, 5:27 PM #8
Yeah, what was that about the mots code, GBK? Just kiddin. I respect somebody who naturally scraps pre-made code just to do it yourself. The only problem i see is that it lacks a return message at the end... I won't usurp gbk's code and tell you where to put it (hint, hint, i don't actually know where it goes). I don't know if some condition makes this unnecessary, but it may work to put one...

------------------
"We've compiled 43 songs on one CD... But it's a big one... And it's made outta chocolate!"

- Ryan Stiles of 'Whose Line Is It Anyway?'
2002-04-23, 1:23 AM #9
He uses stop instead of return. That's not the problem.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-04-23, 1:42 AM #10
the cog works fine, I checked, you must have done something wrong with renaming or pasting the code or something.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-04-23, 6:38 AM #11
I just checked it, and it works fine.

Reinstall 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-04-24, 3:59 PM #12
Whoops. Sorry. I just retested it. My fault.

-xavier
Stand firm in your faith, or you will not stand at all. -Isaiah 7:9

↑ Up to the top!