- Joined
- Jul 7, 2011
- Messages
- 504
- Reaction score
- 109
I'm sure most mappers here have seen the following 'problems' in their map:
These MS:C entities (and a bunch of others, complete list in a few) can, in some cases, produce the above error, which really isn't an error at all. When you click on the description of the problem, you are treated to something in Crazy Moon Language:
You can ignore the problem because it doesn't cause anything to go wrong anyway, but it sure is annoying to see the Problems window spammed with bogus errors. Not to mention that "Fix" is useless here...
So here's what causes it: The "angles" keyvalue (this is the three-number property that defines how an entity is rotated, example "angles" = "30 0 45") isn't defined explicitely for all MS:C entities that need it.
The fix is easy, though: Just copy the Angles BaseClass from halflife.fgd...
...and paste it somewhere near the top in ms1.4.fgd
Now close halflife.fgd and in ms1.4.fgd go to all of the following entities:
ms_player_spawn
ms_player_begin
ms_player_spec
msitem_spawn
ms_npc
msmonster_boar
msmonster_hawk
msmonster_giantrat
msmonster_bat
msmonster_giantbat
msmonster_skeleton
msmonster_orcwarrior
msmonster_orcberserker
msmonster_orcarcher
msmonster_orcranger
msmonster_troll
msnpc_human1
msworlditem_treasure
env_model
...and add "Angles" in the base() header (separate BaseClasses by commas ","). If you don't know how to do that, here's an example.
BEFORE
AFTER
As you can see, I only changed base(ms_basenpc) to base(Angles, ms_basenpc)
Another example:
BEFORE
AFTER
Here I only changed base(spawnspot) to base(Angles, spawnspot)
So just add "Angles" (and a comma, if necessary) to the base() header of the nineteen entities listed above, and most "unused keyvalues" problems will be gone.
Some more exotic keyvalue problems
If you want to have a func_button remove an entity upon press, you will have to define the "killtarget" keyvalue for it. Do this by adding, in halflife.fgd, the following line to the func_button keyvalue list:
If you want to assign an MS:C script to a func_rotating (the only case where you'd actually want to do this is to make 'clock hands' like those in edana), add the following line to func_rotating:
Some really exotic keyvalue problems
For those handsome VHLT users out there who use zhlt_usemodel and zhlt_copylight, I have two useful BaseClasses that can be added to halflife.fgd and/or ms1.4.fgd
Which entity or entities you now add one or both of these BaseClasses to is of course entirely up to you. I myself added VHLTcopylight to MS:C's env_model, just to give an example.
Code:
Entity (msmonster_skeleton) has unused keyvalues
Entity (ms_player_spawn) has unused keyvalues
Entity (msworlditem_treasure) has unused keyvalues
Entity (env_model) has unused keyvalues
Pressing "Fix" has actually deletes the unrecognized keyvalues, ie. it removes data from your entity that you assigned and the result will most likely be that your entity will no longer function properly.The entity contains keyvalues that are not used in its class. You can fix this error with the Fix button.
You can ignore the problem because it doesn't cause anything to go wrong anyway, but it sure is annoying to see the Problems window spammed with bogus errors. Not to mention that "Fix" is useless here...
So here's what causes it: The "angles" keyvalue (this is the three-number property that defines how an entity is rotated, example "angles" = "30 0 45") isn't defined explicitely for all MS:C entities that need it.
The fix is easy, though: Just copy the Angles BaseClass from halflife.fgd...
Code:
@BaseClass = Angles
[
angles(string) : "Pitch Yaw Roll (Y Z X)" : "0 0 0"
]
Now close halflife.fgd and in ms1.4.fgd go to all of the following entities:
ms_player_spawn
ms_player_begin
ms_player_spec
msitem_spawn
ms_npc
msmonster_boar
msmonster_hawk
msmonster_giantrat
msmonster_bat
msmonster_giantbat
msmonster_skeleton
msmonster_orcwarrior
msmonster_orcberserker
msmonster_orcarcher
msmonster_orcranger
msmonster_troll
msnpc_human1
msworlditem_treasure
env_model
...and add "Angles" in the base() header (separate BaseClasses by commas ","). If you don't know how to do that, here's an example.
BEFORE
Code:
@PointClass base(ms_basenpc) color(128 0 0) studio("models/monsters/Boar.mdl") = msmonster_boar : "Boar"
[
defscriptfile(string) : "Default Script (do not change)" : "monsters/boar"
]
Code:
@PointClass base(Angles, ms_basenpc) color(128 0 0) studio("models/monsters/Boar.mdl") = msmonster_boar : "Boar"
[
defscriptfile(string) : "Default Script (do not change)" : "monsters/boar"
]
Another example:
BEFORE
Code:
@PointClass base(spawnspot) studio("models/human/male1/male1.mdl") = ms_player_spawn : "Generic spawn point"
[
message(string) : "Link to Transition"
]
Code:
@PointClass base(Angles, spawnspot) studio("models/human/male1/male1.mdl") = ms_player_spawn : "Generic spawn point"
[
message(string) : "Link to Transition"
]
So just add "Angles" (and a comma, if necessary) to the base() header of the nineteen entities listed above, and most "unused keyvalues" problems will be gone.
Some more exotic keyvalue problems
If you want to have a func_button remove an entity upon press, you will have to define the "killtarget" keyvalue for it. Do this by adding, in halflife.fgd, the following line to the func_button keyvalue list:
Code:
killtarget(target_destination) : "KillTarget"
Code:
scriptname(string) : "Use scriptfile (for clock hands)"
For those handsome VHLT users out there who use zhlt_usemodel and zhlt_copylight, I have two useful BaseClasses that can be added to halflife.fgd and/or ms1.4.fgd
Code:
@BaseClass = VHLTcopylight
[
zhlt_copylight(string) : "Use light data from this entity"
]
Code:
@BaseClass = VHLTcopymodel
[
zhlt_usemodel(string) : "Use model (appearance) from this entity"
]