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 → I have a favour to ask.
I have a favour to ask.
2005-02-19, 9:04 PM #1
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.
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2005-02-19, 9:20 PM #2
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.
2005-02-20, 7:20 PM #3
cant find it, anyone able to help?
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2005-02-21, 10:49 PM #4
Can someone please help? Ill give you full credit. This is the difference between a new sp level or not.
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2005-02-22, 5:56 AM #5
There are a number of AI-related cogs in Massassi's cog repository; one of those might do the trick.
And when the moment is right, I'm gonna fly a kite.
2005-02-22, 7:53 PM #6
This is the best one I could find.

Code:
# 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?
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2005-02-22, 10:25 PM #7
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)
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2005-02-23, 4:24 PM #8
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 :)
May the mass times acceleration be with you.
2005-02-23, 4:24 PM #9
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.
May the mass times acceleration be with you.
2005-02-23, 7:33 PM #10
Thanks alot slaw thats really helpful.
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi

↑ Up to the top!