View Full Version : custom effects in hammer
06-27-2007, 04:55 AM
i've added the sparkle code from the devwiki tutorial and rebuilt my mod's source, but the effect isn't accesible in hammer. i've probably missed adding a call that the tutorial source omitted, but i'm too new at this to know. what have i missed? hammer is properly set up to pull from my mod.
06-27-2007, 09:05 AM
Have you edited the FGD (The file hammer uses to define entities to place)? If not, search on the wiki for info about that.
06-27-2007, 11:08 AM
alright. after looking through fgd article, i have a general understanding of entity defintions, but not quite enough to understand those i've looked up in the base.fgd. here's the intial env_spark definition:
@PointClass base(Targetname, Parentname, Angles) iconsprite("editor/env_spark.vmt") = env_spark
are "targetname," "parentname," and "angles" simply variables that reference the appropriate classes automatically? otherwise i don't really understand them. and is defining the pointclass as "env_spark" enough for the definition file to be referencing the env_spark effect as defined within the engine codebase? i have more questions, but i'd like to start here.
07-06-2007, 12:03 AM
can anyone help me with this?
07-06-2007, 06:21 AM
i'm not sure what the sparkle adds, but i'm assuming it's based on the env_spark. if that's the case, try copying that whole line in the base.fgd to your mod's .fgd (which should include the base.fgd).
change the end of it " = env_spark" to " = env_sparkle" (or whatever you named your new entity).
compile a map with the effect. if there are any compile errors, then your .fgd may need more fields.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.