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 → Shooting a projectile
Shooting a projectile
2001-09-03, 12:21 PM #1
A projectile won't collide with another projectile. So how would you make them collide?

I've tried attaching an actor to a projectile, but unless I have the proj's collide set to 0, they explode when I attach them. Is there any way to get around that?

------------------
Truth is in the eye of the beholder

[This message has been edited by SaberMaster (edited September 03, 2001).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-09-03, 10:32 PM #2
I guess the movesize and the size values are way too small to hit with each other try raising them both.

SetThingCollideSize, I think.

------------------
http://millennium.massassi.net/ - Millennium
2001-09-04, 12:47 PM #3
No, it's not that. I could be wrong, but it seems that two things with type=weapon in their template just won't collide.

------------------
Truth is in the eye of the beholder
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-09-04, 1:39 PM #4
Ah, I see.

How about... make a projectile as an actor?
You probably want to attach a cog with a touched message, so you can manually control the explosions and fleshhit abilities, with no ai and other actor features of course.

------------------
http://millennium.massassi.net/ - Millennium
2001-09-04, 4:39 PM #5
Try creating the actor slightly behind the projectile so it doesn't collide right away.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2001-09-05, 6:45 AM #6
I created an actor template for the projectile and attached a cog to it. And in the touched and killed messages of the cog, I have Destroything(GetSenderRef()); The removed message creates the explosion(And does a lot of other things besides).

This works very well, but it's unstable and it's probably because of the destroythings.

Would SetLifeLeft() do better? What flag has to be set for SetLifeLeft() to work?

------------------
Truth is in the eye of the beholder
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-09-05, 12:00 PM #7
OK, I just spent a few hours trying to get this thing to work. I'm trying to get about 5 of the projectiles I'm working on to be shootable.

One of these projectiles(the one with sendmessage trouble) will continuously run the touched: message when collide is not 0. A regular projectile ran touched: just once as it was fired(I guess it touched the player). I couldn't find anything that could cause it and it happens in more than one level.

The other problem I have is that the actor-projectile will not explode when it hits a wall unless it has low enough health that the collision will kill it.

How could I fix those problems? [http://forums.massassi.net/html/confused.gif]

Aside from the above, making the projectile and actor works fairly well. Rbots finally have a chance against my new weapons [http://forums.massassi.net/html/biggrin.gif]

------------------
Truth is in the eye of the beholder
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-09-05, 1:24 PM #8
One way to find out what it's touching is to print the senderref in the touched message, note what it prints out. (If you can). Open up JED and load up the level, see what the thing is of that number that got printed out.

Or print GetThingType of the senderref to see what the heck keeps kissing the projectile, etc.

I think it may be the surface as all actors are attached on surface, maybe fiddle with some actor flags or physflags so it never sticks on floors or something.

As for the second, I may be able to come up something better if I look at the template and the cog, but from what you said, the easiest seems like this. Proj cog:

Code:
created:


    SetThingHealth(GetSenderRef(), 1);


    return;


Good luck.

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited September 05, 2001).]
2001-09-05, 2:32 PM #9
I found out what caused the missile the missile to always be touching something. I was firing sprites in front of the missile. [http://forums.massassi.net/html/redface.gif]

Ok, I'll set the health to one for now, but I'll need to have it higher so it's not too easy to shoot down.

Thanks for your help with this, Hideki [http://forums.massassi.net/html/wink.gif]


------------------
Truth is in the eye of the beholder

[This message has been edited by SaberMaster (edited September 05, 2001).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-09-11, 2:52 PM #10
I've been trying to figure out this same problem while trying to make a shock rifle ala UT. I couldn't get verbs checking the players posistion and look vector to work properly or really think of a way to make projectiles shootable.

The last theoretical solution I have thought of was creating a projectile template with a trailthing of small explosions so "set off" the shock ball. I'll probably attempt that this week.

But it sounds more like you are making a nuke to me...
2001-09-12, 8:41 AM #11
No, I'm making a patch which replaces the raildet with a missile launcher that fires several types of missiles.

You can't get the players complete look vector with GetThingLVec() because it won't give you the z vector(head pitch). So, you'd need to fire a projectile from the player and use VectorSub(GetThingPos(player), GetThingPos(proj)); to get the real lvec.

So to detonate the shock ball, you would add a trailthing explosion to every other weapon template? That would be a lot of trouble even if it worked.

What I did was change my weapon template to a simple actor template. I had to change a lot of things - like sending a trigger from the killed and touched messages to create the explosion. But I think this method is better.

Hope that helps you. [http://forums.massassi.net/html/wink.gif]

------------------
Fiction must be more realistic than truth or no one will believe it.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!