View Full Version : I have a favour to ask.
a_person
02-20-2005, 12:04 AM
HI! I was hoping someone would be able to make me a cog. The cog will give me about 50 thing slots to mark. At startup all things marked will join my alliance and fight my enemys. However they will not follow me around.
Now this isnt essential but I would like it if its not to difficult. If I kill one of the marked things all the others will turn on me and kill me but they will still attack and be attacked by my other enemys.
Thankyou.
P.S. Does anyone know where I can get a rebel soildier charecter, like the ones at the begining of SW episode 4. Also any other rebel models would be helpful.
Thanks again.
Stormtrooper
02-20-2005, 12:20 AM
I think someone made an extreamly good actor cog that did just what you're looking for, try searching through some of the older posts for it.
For the models, I think it was Al Macdonald's skin pack that had a bunch of good SW models in it. It's not on his site anymore but I'm sure if you ask, someone will send it to you.
a_person
02-20-2005, 10:20 PM
cant find it, anyone able to help?
a_person
02-22-2005, 01:49 AM
Can someone please help? Ill give you full credit. This is the difference between a new sp level or not.
There are a number of AI-related cogs in Massassi's cog repository; one of those might do the trick.
a_person
02-22-2005, 10:53 PM
This is the best one I could find.
# Jedi Knight COG Script
#
# 00_friendly.cog
#
# Actor designated by 'friendly' will assist the player once touched.
# Passive_ai is the actor's AI when not attacking.
# Angry_ai is the actor's AI when battling an enemy.
# I'd suggest pednarsh.ai or something of the sort for passive_ai and then
# use one of the actor's original AI files for it's angry_ai.
#
# Example: for a friendly stormtrooper, set the passive_ai to pednarsh.ai and
# the angry_ai to stdefault.ai.
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# Scripted 1998 by Zero. Email at: zero@downeast.net
symbols
message startup
message touched
message killed
message pulse
thing friendly mask=0x408
thing player local
thing enemy local
ai passive_ai
ai angry_ai
end
# ================================================== ======================================
code
startup:
player = GetLocalPlayerThing();
AISetClass(friendly, passive_ai);
return;
touched:
if(GetSourceRef() != player) return;
SetPulse(1.0);
return;
killed:
SetPulse(0.0);
return;
pulse:
enemy = FirstThingInView(friendly, 170, 12, 0x4);
player = GetLocalPlayerThing();
if((enemy == friendly) || (enemy == player) || (!enemy))
{
AISetClass(friendly, passive_ai);
return;
}
AISetClass(friendly, angry_ai);
AISetFireTarget(friendly, enemy);
AISetMoveThing(friendly, GetThingPos(enemy));
AISetLookPos(friendly, GetThingPos(enemy));
AISetMode(friendly, 0x202);
AIClearMode(friendly, 0x1000);
return;
end
But it doesnt really make sense to me. Is there a command to change a charecters aliance to the player?
LKOH_SniperWolf
02-23-2005, 01:25 AM
No, not in JK. However, you can control what the AI targets. You could probably mess with some of the RBot's code to get what you want. Just have it check that it's target isn't the player or of a specific template (for friendlies), and if it isn't, then set target. As for the player part, just have a trigger and a cog variable "haveKilled". Under the AI killed message, check to see if the player was responsible. If so, change the haveKilled variable. (Have a check to see if the variable is true, and if so, allow player to be targeted)
darthslaw
02-23-2005, 07:24 PM
I modified that cog to do all the stuff.
Also, instead of assigning friendly things in the cog, just assign a friendly template and all things of that template will be allies to you :)
darthslaw
02-23-2005, 07:24 PM
er, forgot to attach the sample level :o
it's a very small reenactment of the first battle in ANH, in front of where the stormies board the ship. The imp commandos (meant to be rebels) are your allies.
a_person
02-23-2005, 10:33 PM
Thanks alot slaw thats really helpful.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.