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 → N00B-Class Cog Questions
N00B-Class Cog Questions
2002-11-21, 1:33 AM #1
1. What should I write to the cog-code (and where) of a NPC (like Imperial Commando), that when shooting him to some part of his body (like head, body, legs...) changes to another mat (like from non-damage mat to damaged mat)?
2. Or what should I write to the cog-code, that if the shot just injured him, so it changes to another mat, and when shooting him so much that he would start bleeding, and it changes to another mat (not the same mat what I use for the injured-mat)?
3. What should I write to the cog-code (and where) of a NPC (like Stormtrooper), that when you shoot him few times, he just falls down and starts whining and struggling in the ground, but not dying?

------------------
The Advanced TC
TC with no new levels, only a one big mod what has improved weapons, coloured Glowsabers, and new detailed character models..but it has a lot of JO converted to JK, so it won't be at Massassi...
2002-11-21, 3:10 AM #2
1 - too many models you have to do, pain in the a**. Skip it.

2 - Damaged message, if GetThingHealth(victim) < 30 SetThingPulse(victim, 1);
Killed message, SetThingPulse(victim,0);
Pulse message, CreateThing(blood, victim);

3 - Smae damaged message except use PlayKey() and SetAIClass.

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

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-21, 6:50 AM #3
What DP forgot to say was, you cant directly address surfaces on a 3d0 with cog. The only thing, in this case, you could do would be to swap out the NPC's model. You would need a variety of different models of the NPC, IE, head injury, bad head injury, terminal head injury, ETC... Its alot of work, work I doubt you would want to invest, seeing as how its such a cheap effect.
And when the moment is right, I'm gonna fly a kite.
2002-11-21, 12:51 PM #4
Couldn't you just make multi-celled mats and have a cog change the mat cell when the enemy is injured?

------------------
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "STROOPER WUZ 'ERE!!!"
2002-11-21, 1:29 PM #5
^^ Yes, but then if you had multiple enemies whose same model all used that mat, you would run into problems. (All of them would get a head injury from one of them being shot in the head) This method would work fine however if he only had one enemy in appearance at a time however, say a boss enemy.
2002-11-21, 1:29 PM #6
You could, but then, every enemy with that model would be changed...
And when the moment is right, I'm gonna fly a kite.
2002-11-21, 1:30 PM #7
Bah, you beat me by seconds... [http://forums.massassi.net/html/smile.gif]
2002-11-22, 4:13 AM #8
Or if I would have to create many models, what should I write (and where) to the cog-code to make the non-damaged change to damaged model?

------------------
The Advanced TC
TC with no new levels, only a one big mod what has improved weapons, coloured Glowsabers, and new detailed character models..but it has a lot of JO converted to JK, so it won't be at Massassi...
2002-11-22, 5:00 AM #9
I'm not sure what you're asking...but if you're trying to do your orginal method anyway, keep in mind that you will need a model for EVERY different state the enemy could be in. For instance, head heavy damage and left arm light damage is one model. And head heavy damage and left arm heavy damage is a whole different model. You can see where I'm going here, you will have tons and tons of models. This isn't really a feasible method simply because it will balloon the file size, not to mention the cogging would be pretty time intensive.

Because as far as I know, there is not way to change different parts of a model aside from swapping to a similar model itself.

↑ Up to the top!