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 → Need help with Killbot cogs.....
Need help with Killbot cogs.....
2003-07-15, 11:46 AM #1
Here is his actor cog:

Code:
# Jedi Knight Cog Script
#
# ACTOR_KB.COG
#
# ACTOR Script - Standard Killbot
#
# [CR]
#
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# ========================================================================================


symbols

message      killed                                                           
message      skill                                                            
message      damaged                                                          
message      sighted                                                          

flex         damageAmount                       local                         
flex         damageType                         local                         
flex         totalDamage                        local                         
flex         activator                          local                         
flex         activated                          local                         

end                                                                           

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

code

sighted:
   activator=(getsourceref);
   activated=(getsenderref);
   AISetFireTarget(activated,activator);
   AISetMoveThing(activated,activator);
   AISetLookPos(activated, GetThingPos(activator));
   AISetMode(activated, 0x202);
   AIClearMode(activated, 0x1004);
return;

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

killed:
	return;

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

skill:
   ReturnEx(-1);
   return;

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

damaged:
   damageAmount = GetParam(0);
	damageType = GetParam(1);

	totalDamage = damageAmount;

	if (BitTest(damageType, 0x01))
   {
      totalDamage = damageamount * 0.5;
   }

   if (BitTest(damageType, 0x02))
   {
      totalDamage = damageAmount * 0.5;
   }

   ReturnEx(totalDamage);
	
   return;

end


Now, I want to change it from the killer it is to something better: a companion who stays with you (not like that crappy max cog that the above is an edited version of) and spawns next to you on any level, without a special thing in the level (my guess is a CTAP(ghost, GetThingPos(player)) in the startup code. Also, it needs to have some way to avoid getting stuck, like sending a text message to the player when it loses sight or gets a certain distance away. Plus, the major thing is it has to shoot enemies...

------------------
- Laserjolt (with a smaller sig!)

Folder: LucasArts
Size: 3.29 GB (3,540,445,700 bytes)
Size On Disk: 2.08 GB (2,239,862,836 bytes)
Contains: 21,338 Files, 938 Folders

[This message has been edited by Laserjolt (edited July 15, 2003).]
Folder: LucasArts
Size: 7.41 GB (7,957,329,759 bytes)
Size on Disk: 5.16 GB (5,544,473,484 bytes)
Contains: 28,807 Files, 1187 Folders
Last Updated: 3/29/05
2003-07-15, 8:33 PM #2
Why on earth do you have "(getsourceref);" in your cog?

That WORKS?

------------------
Brutally honest since 1998
2003-07-16, 6:50 AM #3
So you're making a mod that will create an friendly actor beside you on startup? And this actor will follow you through the level killing enemies?

That'd be a good idea, but in most levels there would be at least one obstacle that an actor can't get through. So you'd need to teleport the actor to the player when he gets out of sight or something like that.

It's not that hard to do, but what's the problem?

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-16, 2:39 PM #4
I can't get the actor to show up, don't know how to make it teleport, etc. I have NO idea what I have to do to get it to work. It has the 3do, cog, snd, pup, key, etc. and still won't appear

[edit] I fixed the not showing up, but it still won't shoot, even with +elaser in its template [/edit]

------------------
- Laserjolt (with a smaller sig!)

Folder: LucasArts
Size: 3.29 GB (3,540,445,700 bytes)
Size On Disk: 2.08 GB (2,239,862,836 bytes)
Contains: 21,338 Files, 938 Folders

[This message has been edited by Laserjolt (edited July 16, 2003).]
Folder: LucasArts
Size: 7.41 GB (7,957,329,759 bytes)
Size on Disk: 5.16 GB (5,544,473,484 bytes)
Contains: 28,807 Files, 1187 Folders
Last Updated: 3/29/05
2003-07-17, 1:07 PM #5
and I have getsourceref because I'm too lazy to type getplayerthing or w/e


------------------
- Laserjolt (with a smaller sig!)

Folder: LucasArts
Size: 3.29 GB (3,540,445,700 bytes)
Size On Disk: 2.08 GB (2,239,862,836 bytes)
Contains: 21,338 Files, 938 Folders
Folder: LucasArts
Size: 7.41 GB (7,957,329,759 bytes)
Size on Disk: 5.16 GB (5,544,473,484 bytes)
Contains: 28,807 Files, 1187 Folders
Last Updated: 3/29/05
2003-07-17, 3:00 PM #6
Code:
activator=GetLocalPlayerThing();


There is no sourceref.

So this is a patch, right? You're not using JED or anything. Did you copy all of the templates into the static.jkl? And define all of the resources (*.spr, *.snd, *.pup) that the templates reference?

So your actor won't shoot. Does he use a modified AI file or one of the original LEC AI files. And does its AI file have the normal attack instincts like PrimaryFire.

Can you also post the cog that you use to create your actor? You're going to need to describe your setup a little better because it's pretty vague as it is.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited July 17, 2003).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!