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 → JK type rectile with a sprite.....
JK type rectile with a sprite.....
2003-01-21, 5:15 PM #1
I'd like to rid myself of the silly JK shrinking/growing rectile, and replace it with a spiffier sprite. Problem is, I'm not an expert at Vector math. (I learn best from examples, gogo SaberMaster) I know enough to do what I want, except this. -_-

I'm thinkin setting the Y pos to a constant (so the sprite stays the same size) and then some vector math involving the Z and X axis of the camera pos and target pos, but I'm not quite sure where to begin. There's the whole y axis differenace coupled with the x/z..... arg. *dies*
-Hell Raiser
2003-01-21, 9:13 PM #2
Sorry I cant figure out what your trying to achieve.

Whats meant to happen when the sprite stays the same size?
Team Battle.
2003-01-22, 2:40 AM #3
I want to replace the JK force power targetting rectile. Is that so hard to understand? [http://forums.massassi.net/html/tongue.gif]
-Hell Raiser
2003-01-22, 4:46 AM #4
I understand what you are trying to acheive, and without being an expert in vector math myself (in fact, I know very little) I would say the method you are attempting seems like it should work.

To start with I would suspect you would need to get the vector between the player and the target. I can't remember how to do this off the top of my head (Had something to do with vectorsub() if I remember correctly) but cracking open an grappling hook cog will reveal it to you.

After that I'm about as lost as you on how to change the Y. Perhaps something along the lines of:

VectorSet(VectorX(oldtargetvector), distance, VectorZ(oldtargetvector), amount?);

where oldtargetvector is the vector between player and target and distance is your static Y distance. I can't remember if amount is needed, check the JKSpecs.

Again, I'm not sure I know any more than you...but thats just my 2 cents.
2003-01-22, 2:11 PM #5
All I know from briefly looking into that code is that the default reticle is not a sprite, there's a function for it or something. You can control the colors, too.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-01-22, 2:58 PM #6
Remove the target verbs, then replace with this. This creates the rectile at the pos of the victim, not a little in front.
Code:
dummy = CreateThing(rectile, victim);
AttachThingToThing(rectile, victim);

// Removing
DestroyThing(dummy);
You might have to switch the things in the Attach verb.

------------------
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
2003-01-22, 3:17 PM #7
Emon, you're no help. At all. (hey hey, what a surprise) Either you think I'm stupid, or you've got a comprehension problem. Yes, the default rectile isn't a sprite. Yes, I can control the colors of it. Thing is, I don't want it.

DP, there is only one flaw with that. If the target is 50 JKU's away, so is the target rectile sprite.

Why do I even bother?
-Hell Raiser
2003-01-22, 5:06 PM #8
The way you wrote it, it looked like you wanted to take the existing sprite and replace it with another sprite. I wasn't sure if you knew that or not, I figured you might appreciate me telling you if you didn't know. I don't know what your skills are, I don't know if you are at an intermediate level or are very experianced with JK's code.

I haven't worked with JK in a while, so I can't provide that much help, but I figured I might say something which might be helpful. If not to you, than maybe other people could benefit from it. Many people read the threads that one person posts. I help a lot of people on the JO editing forum and the tech forum, I only contribute a little on the JK forums now. So if you don't like how helpful my comments are excusively to you, that's your problem.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-01-22, 7:23 PM #9
I should have known nobody knows who the **** I am around here or what the hell I can do. God forbid if you don't know who the manbaby or wtf ever level makers are. [http://forums.massassi.net/html/rolleyes.gif] As much as you don't give a rats *** , I cog for DBZ: TDiR. None of you could possibly fathom half the things I've done for it.

I don't see why I bother with the cog forum anymore. Everytime I post a problem of mine, it takes a good 5-10 posts to get people to understand what the hell I want to be done, and then after that there's no solution. Seven times out of ten I find out for myself after tedious trial and error. I can't believe I actually thought somebody around here has already done what I would like to do. (or at least something similar)

Oh and Emon, I'd sure like to know how in the world your thought process associated replacing the circle graphic with vector math. Do you even read any of the replies? Bleh, where's SaberMaster when you need him...

Just because I don't post cogs for people who whine "I want this and this and that and that" doesn't mean I don't know my ****. Where in the hell are the best supposed to go for help?
-Hell Raiser
2003-01-22, 7:44 PM #10
Quote:
<font face="Verdana, Arial" size="2">I'd like to rid myself of the silly JK shrinking/growing rectile, and replace it with a spiffier sprite.</font>


I'm not sure how you get "I'd like to rid myself of the silly JK shrinking/growing sprite" out of "I'd like to rid myself of the silly JK shrinking/growing rectile."

HR has posted stuff about TDiR in the past, and I'm pretty sure I've seen you reply to some of those threads (or at least one). So either you made some grand assumption at the time and figured he was just a beta tester posting screens and didnt bother to go check out what his job is on the team, or you just know that he knows a thing or two about cog but couldnt possibly know as much as you.
2003-01-22, 9:22 PM #11
*cuddles Hell Raiser*

Settle down there [http://forums.massassi.net/html/smile.gif] Emon gets on everyone's nerves so just ignore him.

About your problem... hmm it's been awhile since i've done any cogging and I have no idea if this will work properly, but you could try use a fire projectile like this..

Code:
positionvector=VectorSub(VectorNorm(GetThingPos(target)), VectorNorm(GetThingPos(player)));
spritevector=VectorSet(VectorX(positionvector), setdistance, VectorZ(positionvector));
FireProjectile(player, sprite, -1, -1, '0 0 0', spritevector, 1.0, 0x60, autoAimXFOV, autoAimZFOV);


setdistance is the distance you want the sprite to be from the player to keep the size of the sprite the same.
2003-01-22, 10:49 PM #12
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Hell Raiser:
None of you could possibly fathom half the things I've done for it.
</font>


Yes, I believe I can fathom it. I am sure many of the experienced ones can imagine what some crazy cogger has done to poor old jk [http://forums.massassi.net/html/wink.gif]

Quote:
<font face="Verdana, Arial" size="2">Originally posted by Hell Raiser:
I don't see why I bother with the cog forum anymore. Everytime I post a problem of mine, it takes a good 5-10 posts to get people to understand what the hell I want to be done, and then after that there's no solution.</font>


Sorry that was my fault, sometimes it takes me awhile to realise what people want. I am alittle slow when people try to communicate. But truly I wish to help.

Now that DP made a fool of himself I think I understand the problem.

Do you want the rectile to sit just infront of the player and depending where the player the rectile moves to stay ontop of him on the screen? Like scrolls to be over the victom all the time when you look around? Sort of like autoaim crosshairs in some games?

If I have again screwed the interpretation then I am very sorry.
Team Battle.
2003-01-23, 12:56 AM #13
It seems I has misjundged how difficult this problem is [http://forums.massassi.net/html/frown.gif]

I will try to come up with a better solution after I get some sleep. Sorry.
Team Battle.
2003-01-23, 3:07 AM #14
Hell Raiser did you try Seifer's or my solutions? (They were virtually the same thing, but his was refined and immediately useful.)

I usually don't reply because everyone seems ignore my responses for the most part. The same thing with my topics. I think everyone looks at my post count and immediately assumes I'm a n00b. I was a n00b, back when I went by El_Scorcho 4 years ago.

I realize some of my questions may have a difficult or nonexistant solution, but I would still appreciate people throwing out some ideas. But I don't even really get that anymore. I either get no response at all (My matching head pitch thread) or no one actually reads what I wrote and start offering solutions to a similar, yet completely unrelated issue. (Like my laser trip mines threads, of which there were many)

Perhaps I'm just frustrated because I'm expecting the same useful advice I received back when I started editing. I suppose I shouldn't expect that any longer since I've advanced to the point that a lot of the things I try haven't been done before. I post here, but I acknowledge that when it comes right down to it, I'm going to have to do the theoretical and code myself.

Thank you for reading my delightful rant. :P


[This message has been edited by Wave_Of_Mutilation (edited January 23, 2003).]
2003-01-23, 12:54 PM #15
*needs to find some kinda stress reliever*

Well at any rate, yea. [http://forums.massassi.net/html/wink.gif]

Seifer, good to see you're around, lurking.

In your example, spritevector wouldn't work in the FireProjectile command where it's at. I do believe you meant to put it in the first set of '0 0 0'. I've tried that with a tad of success, and seems to be the route I need to go, but thats far from all the code I need. I've got a couple things I thought up that I need to trial and error on. [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/tongue.gif]
-Hell Raiser
2003-01-23, 1:16 PM #16
Badabing, badaboom:

Code:
	RecVec=VectorScale(VectorNorm(VectorSub(GetThingPos(Victim), GetThingPos(Camera))), 0.1);
	RecVec=VectorAdd(GetThingPos(Camera), RecVec);

	CreateThingAtPos(Rectile, GetThingSector(Camera), RecVec, '0 0 0');


Works perfectly.

Camera is an actual thing with the view set to it. Not sure if you can get the Pos of the 3rd/1st person views. (I did away with those so long ago)

The 0.1 in the vector scale is how far away the sprite/thing will stay from the camera.

*sigh*

Oh yea, I can think of about a billion uses for this. More than one rectile on the screen, accurate crosshair, complex menu system. Basically anything that needs to stay the same size on the screen and "mark" a position.

[This message has been edited by Hell Raiser (edited January 23, 2003).]
-Hell Raiser
2003-01-23, 2:46 PM #17
Does the crosshair go through the wall if you get to close? I have seen that bug too many times in custom crosshairs.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2003-01-23, 3:44 PM #18
Well, the key is to make your sprite/3do real small, and modify the scalar to your liking.
-Hell Raiser
2003-01-23, 4:11 PM #19
Wasnt a waste of time posting then was it HR? [http://forums.massassi.net/html/wink.gif]

I couldnt get my solution to work cause I was firing a projectile for the rectile... dont bother asking what I was thinking. (good to see I was on the right track [http://forums.massassi.net/html/smile.gif] )
Team Battle.
2003-01-23, 5:58 PM #20
See if I ever help you agian Hellcat. My way does work, just it wasn't what you were looknig for. I wish I could've replied sooner but I couldn't to save my hide and shutup Emon. [http://forums.massassi.net/html/frown.gif]

------------------
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
2003-01-23, 6:59 PM #21
Sorry DP I didnt mean to offend you by saying that. Heck I thought thats what HR meant at first and I was wondering why he was asking such a easy question. Truly I didnt mean it in a bad way, I was just saying how HR replied to your post and helped me understand what the problem was.

I dont doubt your abilities, you are a much better cogger than I am.

I am sorry that I gave the wrong impression.
Team Battle.
2003-01-24, 5:25 AM #22
Hey, you can texture better then I can! *coughFD-31Ccough* I didn't take offese, just wanted to get ya back. [http://forums.massassi.net/html/wink.gif]

------------------
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
2003-01-24, 1:06 PM #23
[http://forums.massassi.net/html/smile.gif]
Team Battle.
2003-01-24, 3:27 PM #24
Personally, I think DBZ sucks, a lot, I don't follow TDiR as a result of it, so naturally I wouldn't know about the people who work on it. I know you've got some experiance from work I've seen you showcase, but even experianced people still discover things. Even after editing this game for almost four years I still discovered little things here and there. If you don't find my comments helpful, just say so, you don't have to get all pissed over it.

And if it takes 5-10 posts for people to understand what you want, perhaps you should try to clear up your message.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-01-24, 3:51 PM #25
Quote:
<font face="Verdana, Arial" size="2">
I know you've got some experiance from work I've seen you showcase, but even experianced people still discover things.
</font>


Like basic crap I can find in The Datamaster? Give me a break.

Quote:
<font face="Verdana, Arial" size="2">
Even after editing this game for almost four years I still discovered little things here and there.
</font>


Like the JK rectile wasn't a sprite that was easily replaced? [http://forums.massassi.net/html/rolleyes.gif]

Quote:
<font face="Verdana, Arial" size="2">
If you don't find my comments helpful, just say so, you don't have to get all pissed over it.
</font>


Fine. Your comments are so un-****ing-helpful they insult me. Hows that?

Quote:
<font face="Verdana, Arial" size="2">
And if it takes 5-10 posts for people to understand what you want, perhaps you should try to clear up your message.
</font>


Wave_of_Mutilation got it, Descent_pilot was kinda on the ball, you went only god knows where.

If I appear to be an arrogant a-hole, well hey, takes one to know one. I can't stand it when people talk to me in an inferior way or tell me something so blatently "DUH" even if they don't know me. (but you do in this case, so yea, I got pissed)

At any rate, I figured it out myself, with obviously no help from you. Good day.

[This message has been edited by Hell Raiser (edited January 24, 2003).]
-Hell Raiser
2003-01-24, 4:02 PM #26
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Hell Raiser:
At any rate, I figured it out myself, with obviously no help from you. Good day.</font>


If you want something done right, you gotta do it yourself.


Sorry I couldnt help, dude, vector math was never my strong point.
And when the moment is right, I'm gonna fly a kite.
2003-01-24, 5:56 PM #27
I'm sorry, I've been sick since Wednesday and I can't do that math I'm so good at. It's hard to think while coughing, sinus pressure, and sickness, ya know? [http://forums.massassi.net/html/wink.gif] BTW - Excellent way to shut Emon up it was *wipes tear* better then what I could have done. As many people have said before, good luck on the project, I can't wait to play it.

------------------
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
2003-01-24, 10:52 PM #28
Hell Raiser... you *could* put an animated mat on a flat 3do whose center is offset.

That way, when you shoot it from the center of the player, it's sticking out a JKU away or whatever, and you can just make it look at the victim.

JK's default reticle is pretty cool, I don't see why you're so intent on changing it though.
2003-01-25, 1:29 AM #29
CS that doesnt work. Think similar triangles for the solution.

Btw I think he has a billion uses for something like this:

Quote:
<font face="Verdana, Arial" size="2">Originally posted by Hell Raiser:

Oh yea, I can think of about a billion uses for this. More than one rectile on the screen, accurate crosshair, complex menu system. Basically anything that needs to stay the same size on the screen and "mark" a position.

</font>


[http://forums.massassi.net/html/wink.gif]
Team Battle.

↑ Up to the top!