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 → This doesnt track propery
This doesnt track propery
2003-03-09, 3:41 PM #1
This cog will track a player with projectiles. I'm not sure if it works in mp yet.

The problem is that when i switch off of 1st person perspective the projectiles dont trakck me anymore.

code

trigger:

if(GetSourceRef() != 11001 + trapID) Return;
for(i = 0; i <rounds; i = i + 1)
{
dimwit = FireProjectile(skull0, proj_tpl, fireSound, -1, '0 0 0', '0 0 0', 1.0, 0x60, autoAimXFOV, autoAimZFOV);
//SetThingParent(dimwit, GetParam(0)); NOT SURE IF THIS WOULD DO ANYTHING
SetThingPulse(dimwit, 0.01);
Sleep(rate);
}
Sleep(delay);
Return;
# ........................................................................................

pulse:
victim = -1;
maxDot = 0;
// Search for all players and actors.
potential = FirstThingInView(GetSenderRef(), 180, 7, 0x404);
while(potential != -1)
{
if (HasLOS(GetSenderRef(), potential) && (potential != GetSenderRef()) &&
(VectorDist(GetThingPos(GetSenderRef()), GetThingPos(potential)) <= 4) &&
!(GetThingFlags(potential) & 0x200) && !(jkGetFlags(potential) & 0x20))
{
dot = ThingViewDot(GetSenderRef(), potential);
if(dot > maxDot)
{
victim = potential;
maxDot = dot;
}
}
potential = NextThingInView();
}

// If we have a victim...
if(victim != -1)
{
ApplyForce(GetSenderRef(), VectorScale(VectorSub(GetThingPos(victim), GetThingPos(GetSenderRef())), Flexforce));
}
Return;

------------------
2003-03-09, 10:06 PM #2
Projectile... Do you mean like a little particle trail? No problem! Just use a simple code like:
pulse: CreateThing(player,part); Return;
But of course you won't see the origin of the particle unless you are looking down.

/Edward
Edward's Cognative Hazards
2003-03-10, 3:55 PM #3
Edward, thats wonderful.

What I'm asking is why the above cog doesnt track the players position when you take out your light saber and the auxilary camera turns on. It tracks fairly well when you are in 1st person view.

------------------
2003-03-10, 9:45 PM #4
Well, I have no idea what to do now... Way to compicated for me...

/Edward
Edward's Cognative Hazards
2003-03-12, 2:22 AM #5
Do you meen a "heat seeking" missile? like the seeking rail detonatiors iin MotS? have you got MotS if not i could send you a copy of the cog to look at.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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?
2003-03-12, 5:07 AM #6
Sure! Send a copy! I've tried to make a concussion bolt that I could stear but haven't been successful.

/Edward
Edward's Cognative Hazards
2003-03-12, 4:00 PM #7
I gots da MotS...maybe i'll look at that cog. By the way, are the forum gurus on vacation?


------------------

↑ Up to the top!