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 → Gonna COG a new Enemy AI
Gonna COG a new Enemy AI
2006-07-12, 12:33 PM #1
Hi!
I have this enemy, never seen in JK before, and I need help Cogging an AI to this contraption of an enemy. It is a "droid" of an odd design. It has a head, that can only turn left and right, and then binoculers for eyes that only turn up and down. Much like a turret. This head will be, kinda linked to an AISetLookPos(). If the enemy hears, or notices something, it will first look with its head and eyes in the direction of what caught its attention, identify for a split second (0.5 in Easy, 0.25 in Medium, 0.1 in Hard), and then aims gun and shoots.
The chest, where the gun is held, also works like a turret, though a little more. Because of the strange design of this "droid", the gun is sitting to the right of the chest. The chest turns left or right to face his enemy (player), then adjusts its gun, not just up and down, but also left and right to be able to hit the player dead on. If there is a Cog verb like it, I'd like to link it to an AISetTargetPos().
The whole body won't turn until it decides to move into that direction (AISetMovePos/Thing()). If there are no more targets, then head, eyes, chest and gun returns to normal.

And the droid speeks! I wish it to speak when it fires its gun, when it looses its target, when re-found, and when victorious.
Oh, and when you kill it, it will explode, and tepending on the damage (explosion, 0x2000 weapon type or lightsaber) it will change model and maybe the head pops off and lands somewhere. Another thing is region detection. If enough damage on the eyes by the 0x2000, then change model to remove eyes, and make droid blind, repeatedly say he's blind, and shoots randomly all over the place.

Hope this is doable, and not too much for you. But I really want this done. I just don't know how to put it together.

If you can guess what this enemy is, or based on, please don't spoil anything. Not even in spoil tags. Thanks.

/Edward
Edward's Cognative Hazards
2006-07-12, 12:47 PM #2
The head to body motion would be impossible because theres no way to detect sounds in JK unless you did something when every sound occured, unless someone can think of something I can't. The locating thing to shoot is best done in the AI since you can't really tell what a thing is targeting, only that it actually is.

However in the thing's class cog to play a sound
Code:
Fire:
   senderref = GetSenderRef();
   PlaySoundThing(sndwavy, senderref, 1, -1, -1, 0x80);
   Return;


For the killing explosion, see any of the actor cogs in normal JK for lightsaber damage (AmputateJoint() or somethin like that, cut of the head join set up in the pup file, and create a head object.

Regional damage would be hard, tho you can do a simple Z dist check (like for headshots) and then create a new AI file, but that would be overly complex and you'd be best off just killin the thing unless its to be a boss.....then possibly..........

Anyways, if you need more explanation, just ask, but I won't be able to check back at Massassi til Friday.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2006-07-15, 5:26 AM #3
Ok, if you find that the head, body, and chest turret movement thing would be impossible, I am willing to divide the model up into 3 or more parts and attach them together again through cog. If this makes it any easier.

/Edward
Edward's Cognative Hazards

↑ Up to the top!