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 → My balls aren't following orders...
My balls aren't following orders...
2004-10-05, 12:26 PM #1
Hi!
No, not those balls. :o I'm talking about balls in a mod of mine... I have a package attached... No not that kind of package... Fags! Stay in your corner.

Now, weapon 9, changed projectiles to assassin ball objects. Assassin Balls have a COG called assassinball.cog. This COG doesn't seem to be working well.

I want these balls to slide around, and shoot at anyone it sees. Problem is that, they won't. I've tried all kinds of stuff, and given up... I'm hoping you could find some answeres for me.
Edward's Cognative Hazards
2004-10-06, 6:14 AM #2
I know exactly how to do this. Could I put it in force_pull?

And for the projectile, i'm not good with other templates so I'll just use +force_shield for now.

Looking at your conc, you got a lot of unnessacary aiming code.

I'll try to work on this later today.

Arden Lyn
2004-10-07, 3:40 PM #3
I believe I found the error. It was what I suspected originally, but I was just reading a Millenium tutorial which confirms it. You can't use 360 degrees in FirstThingInView(). To take exactly from it...
Code:
You do this part several times for the explosion to search around because somehow 360 deg for FirstThingInView doesn't work(even with no ThingViewDot)! Place this in a custom message like "find_them:"

   potential = FirstThingInView(original, 180, 9, 0x404);

   while(potential != -1)
   {
      if( HasLOS(potential, original) && (ThingViewDot(potential, original) > 0) &&
      !(GetThingFlags(potential) & 0x200) &&
      !(GetActorFlags(potential) & 0x100) )
      {
         Spotted = 0;

         for(i = 0; i <= m; i = i + 1)
         {
            if(victim0 == potential) Spotted = 1;
         }

         if(!Spotted)
         {
            victim0[m] = potential;
            m = m + 1;
         }
      }

      potential = NextThingInView();
   }

   return;

Since 360 deg for firstthinginview doesn't work, you need to turn the explosion 180 deg and do the same checking.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-10-07, 3:52 PM #4
I found out the max=180 bug the hard way :(

You can get it to look the other way through:
SetThingLook(original, VectorScale(GetThingLVec(original),-1));
Then run the check again.
May the mass times acceleration be with you.
2004-10-08, 3:33 PM #5
OK... I changed the 360 to 180. It works! All apart from one thing... They seem to be targetting each other. I tried replacing GetThingModel with GetThingParent... Didn't work... I'd like you to find the solution either way, but I think I'd prefer GetThingParent...
Edward's Cognative Hazards
2004-10-09, 5:36 AM #6
i havent actualy looked at your code but how about useing a line like..

if(getthingtemplate(target) == loadtemplate("+assassinball")) // put dont shoot at thing code here
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-10-09, 2:46 PM #7
Hurray! That worked... Now, if possible, only my set of balls are ignored and other players balls are shot at?

/Edward

__________________
Quote:
If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

Air is Nice, Fresh, and Thin...
"Thin air? Why is it always thin air? Never fat air, chubby air,
mostly-fit-could-stand-lose-a-few-pounds air?"
Edward's Cognative Hazards

↑ Up to the top!