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 → Reflection
Reflection
2002-09-25, 5:01 AM #1
Recently, I was looking for a way to create sparks when a reflective bolt (crossbow 2ndary fire) hits a wall. I tried to use the touched message, but the Datamaster told me that this approach was damned to fail. Do you know of another way?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-25, 5:06 AM #2
Hmm, you might try :Damaged...

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.

[This message has been edited by GBK (edited September 25, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-09-25, 5:35 AM #3
Hmm, ok, I'll try that. Thanks.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-25, 7:18 AM #4
Is this effect for the surface or for the projectile? If this is a surface effect, then you can use either damaged or touched (with the correct mask) to created the sparks.

If this is an effect for the projectile, then it's a bit more difficult. I don't know of any event for the ricochet. What I would do is use a thing pulse to check the thing's lvec. When the distance between the old and new lvecs of the projectile is significant, then create the sparks.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited September 25, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-25, 8:34 AM #5
It's for the projectile. I was just looking for an easy way to do it. I'd rather not implement it, than use some sort of pulse to do the job...but thanks anyway.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-26, 3:10 AM #6
this is how I would do it:

In the removed message of your projectiles class cog, create a new projectile at the old projectiles position which has a creatething value in its template which is the sparks. Some value tweaking will be needed of course.

Oh, the original projectile is not magsealed...however the 'child' projectile should be.
2002-09-26, 3:52 AM #7
Hmm. That way the sparks are only displayed at reflection number one.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-26, 5:04 AM #8
Thats true, however you could use a short timer to remove the magsealing flag shortly after creation, and redo the same effect for as many reflections as you want.

This has become a bit more complicated then I originally envisioned it, but its just an idea for you to work with. It seems like a totally feasible method to me.
2002-09-26, 5:40 AM #9
Yes. But it's too complicated and resource-intensive for such a small effect. Thanks, anyway.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-26, 6:48 AM #10
Resource intensive? Pfft. Not nearly as intensive as the RVTCS, and it runs just fine on slower boxes.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-09-26, 9:31 AM #11
Well, it's just a simple sparks fx.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-26, 2:11 PM #12
GBK< what does a crossbow bolt spark cog have to do with the RVTCS?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-09-26, 5:53 PM #13
Clock cycles.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-09-27, 2:04 PM #14
Try this cog. It might just work. [http://forums.massassi.net/html/wink.gif]
Code:
# Jedi Knight Cog Script
#
# Class cog that controls the sparks
#
# [DP]
#

Symbols

thing       projectile           local
thing       dummy                local
template    sparker=+sparker     local

message     created
message     removed

end

code
   Created:
   If(GetSourceRef() == dummy) Return;
   projectile = GetSourceRef();
   dummy = FireProjectile(projectile, sparker, -1, -1, '0 0 0', '0 0 0', 0, 0x0, 0, 0);
   Return;

   Removed:
   If(GetSourceRef() != dummy) Return;
   dummy = FireProjectile(projectile, sparker, -1, -1, '0 0 0', '0 0 0', 0, 0x0, 0, 0);
   Return;
To explain, when the origanal projectile (the BC bolt) is created, then that fires the sparks projectile, and when that projectile hits, then you create a new one. I hope this works. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited September 27, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!