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 → class cog probs
class cog probs
2003-07-30, 7:22 AM #1
this class cog is supposed to make the projectile explode whenever it hits a thing, its works to some extent but not all the way. it will explode on contact with things that are archi but not things like weapon pickups and most importantly the player... so any help on revising this so it works would be appreciated, thanks.
Code:
symbols

template	explosion=+scattexp	local

message    touched


end

# ========================================================================================

code

touched:
CreateThing(explosion, GetSourceRef());
return;

end


------------------
roses are red, violets are blue, I am schizophrenic, and I am too!
roses are red, violets are blue, I am schizophrenic, and I am too!
2003-07-30, 7:57 AM #2
You don't exactly need something like this. You could just make it the 'explosion=template' part of the projectiles template.

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

The Magician Saber System.

The 2 riddle!
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-07-30, 8:28 AM #3
yes i know but i dont want the projectile to explode on contact with surfaces. i only want it to explode if the timer runs out or if it hits a thing

------------------
roses are red, violets are blue, I am schizophrenic, and I am too!
roses are red, violets are blue, I am schizophrenic, and I am too!
2003-07-30, 9:36 AM #4
Touched doesn't run when the player touches your object? Can you post the template? I want to test that.

Not too sure that this will work, but try taking out the class cog and using a weapon with 0x309 typeflags. It should do what you want, but make sure it works correctly with all types of things.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-31, 2:56 AM #5
heres the template
Quote:
<font face="Verdana, Arial" size="2">
+scatt_b _weap thingflags=0x20000401 light=0.7 model3d=scattball0.3do size=0.009895 movesize=0.009895 soundclass=bry.snd vel=(0/6/0) explode=+scattexp fleshhit=+scattexp typeflags=0x204509 rate=0.5 cog=class_scatt_b.cog timer=5 physflags=0x221 buoyancy=0.250000 soundclass=det.snd surfdrag=3.000000 airdrag=0.800000 mass=1.500000
</font>

ill try it with those flags later

------------------
roses are red, violets are blue, I am schizophrenic, and I am too!

[This message has been edited by SaberMaster (edited July 31, 2003).]
roses are red, violets are blue, I am schizophrenic, and I am too!
2003-08-01, 10:45 AM #6
Hey, sorry about the delay... have been kind of busy. [http://forums.massassi.net/html/biggrin.gif]

Will test it right now. [http://forums.massassi.net/html/wink.gif]

[This message has been edited by SaberMaster (edited August 01, 2003).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-01, 11:24 AM #7
Quote:
<font face="Verdana, Arial" size="2">typeflags=0x204509</font>


VoilĂ ! Remove the first bit from the flag.

Your projectile won't collide with items because items won't collide with it. I suppose you could put a pulse in the class to cog to check for items if that's what you need.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-01, 11:40 AM #8
And just for the record, JED is a damned nuisance. Whenever I save a level, I have to open up the jkl and fix the things JED screwed up. I'm going to tell CA / Alex...

[This message has been edited by SaberMaster (edited August 01, 2003).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!