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 → Where's GBK when you need him?
Where's GBK when you need him?
2003-05-25, 4:17 PM #1
Thats not sarcasm at all, [edit]Updated cog[/edit]
Code:
# Jedi Knight Cog Script
#
# CAPTURE.COG
#
# Testing the capture stuff
#
# [DP]
#

symbols
thing       capThing
keyframe    capture
keyframe    kycapture=kycapture.key              local
int         captured=0                           local
thing       dummy                                local
int         player                               local
ai          captureAI=capture.ai                 local
template    ghost=+capture                       local

message     startup
message     pulse

end

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

code

Startup:
   player = GetLocalPlayerThing();
   AISetClass(capThing, captureAI);
   SetPulse(0.05);
   Return;

# ........................................................................................

Pulse:
   If(VectorDist(GetThingPos(capThing), GetThingPos(player)) > .25) Return;
   captured = 1;
   SetCollideType(capThing, 0);
   PlayKey(capThing, capture, 2, 0x0);
   PlayKey(player, kycapture, 2, 0x0);
   dummy = FireProjectile(player, ghost, -1, -1, '0.005 0.02 0', '0 0 0', 0,0,0,0);
   TeleportThing(capThing, dummy);
   SetThingLook(capThing, GetThingLvec(dummy));
   DestroyThing(dummy);
   Return;

end


------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited May 25, 2003).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-25, 4:29 PM #2
The only thing I see that might cause problems, is your use of SetThingPos(). Try using TeleportThing() instead.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-05-25, 6:01 PM #3
Wow, you're still coming here. But thats irrelvent.

After much, hard, long, research, trial and error, and expirementation, I have come to the conclusion that dummy isn't being created. The hypothesis that was proven is that ghost isn't a good template for this type of cog. Thats big fancy scientific talk for. The problem is the thing isn't being created because I needed a different template then ghost.

Now I have a problem with the captured thing jumping ever so slightly up and down. I won't say what it looks like, but yeah, not something you want ingame, ya know what I mean? [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited May 25, 2003).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-25, 6:23 PM #4
Thats something I had alot of trouble with in the early versions of the TVTCS; CreateThing() failing to create an object.

The easist way to destect OCF (Object Creation Failure..) is to do something like

Code:
Blah = CreateThing(Type, Thing);
If(Blah == -1) Print("Warning: Object Creation Failure.");



All of my later TCS cogs had such code in them...

But, anyway. A good alternative to use for the ghost is 'light1.0'. Its worked in every level Ive ever tried it in. If it doesnt, well, just keep trying templates until one does.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');

[This message has been edited by GBK (edited May 25, 2003).]
And when the moment is right, I'm gonna fly a kite.
2003-05-25, 6:38 PM #5
I used the template
Code:
+capture          _weapon            collide=0 vel=(0/0/0) timer=0.05 thingflags=0x0 damageclass=0x0 typeflags=0x0
Works like a charm. To get rid of the little updowns, I removed all of the capThing's physics flags, plus I increased the pulse rate. Works like a charm. Thank you for your lost time. [http://forums.massassi.net/html/tongue.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited May 25, 2003).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-26, 3:28 AM #6
HMG!

GBK actualy is here, i wonder wehter he will stay?

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-05-26, 6:35 PM #7
No ghost created, you say? Whip open your master.tpl file and find the ghost template. Change type=ghost to type=cog. I had this same problem a while back. Cogs won't create things with type=ghost, it seems.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!
Catloaf, meet mouseloaf.
My music
2003-05-26, 11:11 PM #8
I have a theory on the ghost creation problem. See http://forums.massassi.net/html/Forum4/HTML/003748.html for the theory. Please provide input on your thoughts and possibly trials. I am about to fall asleep here so I can't test it till tomorrow.
Please excuse my spelling I am too tired to think straight. I'll edit this later [http://forums.massassi.net/html/wink.gif]

[edit] EDITED [/edit]

------------------
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"


[This message has been edited by SG-fan (edited May 29, 2003).]
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2003-05-27, 1:51 AM #9
Quote:
<font face="Verdana, Arial" size="2">Originally posted by DogSRoOL:
Cogs won't create things with type=ghost, it seems.</font>


Sure they will. There are just certain circumstances when they wont. Of course, there are certain circumstances when they wont create ANYTHING AT ALL. So, that sorta nullifies that theroy. [http://forums.massassi.net/html/frown.gif]

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-05-27, 7:06 AM #10
I know (going back to that lighting cog) sometimes they worked, I change the cog just a little, and they don't work anymore. I'm not sure (yet) what circumstances they do and don't work, but someday when it matters, I'll try to see why.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!
Catloaf, meet mouseloaf.
My music
2003-05-29, 12:14 PM #11
[edit] oops wrong button [/edit]

[This message has been edited by SG-fan (edited May 29, 2003).]
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"

↑ Up to the top!