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 → Actor Cog
Actor Cog
2002-02-17, 4:44 PM #1
I've been experimenting with using Raynor's Rbots Wizard to make new enemies. It has a problem with removing the entire hand instead of just the weapon when they get force pulled or die. To fix that I have tried to modify the actor cog. For some reason it now doesn't remove anything, doesn't create the powerups, nothing. Maybe I've just been staring at it too long and need a fresh pair of eyes to see the problem.

Code:
symbols

message          killed
message          skill
message          damaged

template         powerup=+Dstrifle       local
thing            newThing                local
thing            victim                  local
model		     fists=bwing-1.3do	     local
int              damage                  local
int              bin                     local
int              senderref=-1            local
int		     beenpulled=0                local
ai               flee_ai=noweapon.ai     local

vector		currentpos								local

end

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

code

damaged:
   damage = GetParam(0);
   if(GetParam(1) == 16)
   {
      damage = (damage * 2.0);
   }
   ReturnEx(damage);
   return;

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

killed:
   victim = GetSenderRef();
   if (beenpulled == 0)
   {
	SetThingModel(victim, fists);
      newThing = CreateThing(powerup, victim);
      SetLifeleft(newThing, 200.0);
   }
   return;

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

skill:
   bin = GetParam(0);
   if (bin == 24)       // Force Pull
   {
      // he's a fighter, not a fleer... -srs

      senderref = GetSenderRef();
			// If he hasn't been pulled yet...
		if (beenpulled == 0)
		{
			SetThingModel(victim, fists);

			newThing = CreateThing(powerup, GetSenderRef());
			SetLifeleft(newThing, 30.0);

			AISetClass (senderref, flee_ai);
			AISetMode(senderref, 0x4);
			pulled=1
			ReturnEx(newThing);
		}
		else
		{
				// Give the actor a shove towards the player.
			currentpos = VectorSub(GetThingPos(GetLocalPlayerThing(), senderref));
			currentpos = VectorScale(VectorNorm(currentPos), 250);
			ApplyForce(senderref, currentpos);

			ReturnEx(-1);
		}

      //AIFlee(senderref, GetLocalPlayerThing());

      Return;
   }
   else
   if (bin == 31)       // Force Grip
   {
      ReturnEx(10);     // return base damage that is taken by this actor.
      return;
   }
   else
   if (bin == 34)       // Deadly Sight
   {
      ReturnEx(5);      // return base damage that is taken by this actor.
      return;
   }

   ReturnEx(-1);
   return;

end


------------------
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
2002-02-18, 5:27 AM #2
You have a syntax error in the skill message. You need a semicolon after the pulled=1 statement.

Fix that and see if it works. [http://forums.massassi.net/html/wink.gif]

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-18, 12:42 PM #3
[http://forums.massassi.net/html/redface.gif] Like I said, it needed a fresh pair of eyes.

That partially fixed the problem. Now it behaves properly when he dies, but there is still a problem with the force pull.

When you force pull him, it removes the entire hand instead of switching to the other model. Then when you kill him it spawns ANOTHER weapon and it changes so he has a hand (changes to the other model that has a hand).

------------------
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
2002-02-19, 4:57 AM #4
When the skill message runs, the variable, victim, is not assigned to the actor who's being skilled. So change the SetThingModel() command in the skill message to SetThingModel(senderref, fists); and it should work correctly. [http://forums.massassi.net/html/smile.gif]

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-19, 7:56 AM #5
Oh crap - your right. Thanks.

------------------
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
2002-02-19, 1:36 PM #6
Glad I could help. [http://forums.massassi.net/html/wink.gif]

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-20, 3:28 PM #7
[http://forums.massassi.net/html/frown.gif] Didn't work. I wonder if there's a conflict with the force power cog somehow. I'll look into it and see what I can find.

------------------
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
2002-02-21, 12:03 PM #8
Mike - you seem to be coming across the same problems that I had with developing Rbots. Changing weapons and reacting to Force Pull among them. I had to modify the Force Pull cog, as it does it's own 'weapon pulling' using the AmputateJoint() verb - this results in the need to use a patch. [http://forums.massassi.net/html/frown.gif]

First of all is your enemy for SP or MP?

If only for SP there are many shortcuts you can take. If your actor thing is placed in the level directly from JED and not created at runtime, you can use the jkSetWeaponMesh() verb instead of changing whole actor models. You can also rework you actor model to try and work around what the Force Pull cog does.

If it's for MP - well bad luck, and welcome to the team [http://forums.massassi.net/html/smile.gif]

Raynar


------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2002-02-21, 3:52 PM #9
Oddly enough Raynor - I was just about to email you about this. I had a hunch you ran into the same thing.

It's for SP (hey, you ought to know by know that's my specialty). I'ld prefer not to run it through a patch because I am creating some of these for other people to use. If you can provide any helpful hints I would appreciate it. I haven't had the time to work on this much since my last post, but I plan to dive into it this weekend.

------------------
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association
Have Lightsaber Will Travel JK Editing tips, troubleshooting information, resources and more.
www.swgalaxies.net For all your Star Wars Galaxies needs
The Massassi A SW Galaxies Player Association

↑ Up to the top!