wass24 0 Posted December 20, 2005 How do you put a script in to the config file for an object? I have a sidewalk that turns sideways if something explodes on top of it and I want to give it a script that tells it to setdamage to 0 if damage is greater then 0. Can EventHandlers do this? I have never used them. Share this post Link to post Share on other sites
LoTekK 0 Posted December 20, 2005 If it's turning sideways, you most likely have it subclassed incorrectly (it's probably something like "fence" or something along those lines). Might want to try a search; I know I've seen at least a couple of topics on these forums that cover this issue. Share this post Link to post Share on other sites
wass24 0 Posted December 20, 2005 Honestly, I really don't know what to class my different object addons as. I usually just copy 99% of the config from another addon I did. Is there a list of classes anywhere that would help me? What class would someone use for a roadway? Share this post Link to post Share on other sites
hardrock 1 Posted December 20, 2005 What you're searching for is not a script, but the config property <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">destrType=DestructNo; It's the same on the churches, the object simply isn't deformed when destructed. Share this post Link to post Share on other sites
wass24 0 Posted December 20, 2005 Here is my config file for my sidewalk. I know the classes are probably wrong for a sidewalk, but what should they be. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class sidewalk { units[] = {sidewalk}; weapons[] = {}; requiredVersion = 1.0; }; }; class CfgVehicles { class All {}; class Static: All {}; class Building: Static {}; class NonStrategic: Building {}; class TargetTraining: NonStrategic {}; class TargetGrenade: TargetTraining {}; class sidewalk: TargetGrenade { model="\sidewalk\sidewalk"; destrType=DestructNo; armor=20000; scope=2; displayName="sidewalk"; } Share this post Link to post Share on other sites
hardrock 1 Posted December 20, 2005 It may be enough if you inherit from NonStrategic. If there are properties missing then, look in the original config.cpp (http://www.flashpoint1985.com/breathe) for the values of the classes directly inherited from NonStrategic. Share this post Link to post Share on other sites
wass24 0 Posted December 20, 2005 I have gotten my sidewalk to not take damage, but now it stops vehicle traffic. I want to be able to drive on it. I pasted my config below. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSurfaces { class Roadway {}; class Asfalt: Roadway {}; class Sidewalk : Asfalt { access = ReadOnly; files="\sidewalk\sidewalk"; destrType=0; rough=0.005; dust=0.1; soundEnviron = road; armor=20000; scope=2; displayName="sidewalk"; } Share this post Link to post Share on other sites