hcpookie 3770 Posted October 2, 2012 I've tried searching several ways and can't seem to find anything related. I thought this would have been something easy :) As the title says, I am attempting to GETPOS the projectile impact point. This location is going to be used in a script for the "onTimerScript" setting within a brand-new CfgCloudlets class. The idea being that the shell is fired, the new CfgCloudlets generates an appropriate explosion, and the script fires off to create a smokeshell-type effect. The problem is I can't find a way to GETPOS the impact point. There is an old examle of how to GETPOS the missile every .01 seconds but I haven't had luck making that work... perhaps the scripts need to be updated, not sure. I am wondering if the crater graphic an object? I mean to say the ground impact point that is a dirt-colored circle after for example a rocket impact... not the "crater long" object that appears when aircraft crashes. is that an actual object I can getPos with "NearestObject" or similar? Share this post Link to post Share on other sites
hcpookie 3770 Posted October 2, 2012 (edited) WELL! I think I fixed my problem WITHOUT needing a crater. So there I was trying to understand why the script kept giving me "type array, expected object". So I did a "hint str(_rocket)" and viola! I got coordinates. So if I'm understanding the code, the CfgCloudlets has already getPOS the ammunition via explosionEffects. Do you know what this means? This means that you don't necessarily have to "GETPOS" a projectile! Just put the script in the "onTimerScript" setting and configure the explosioneffects properly (following the BIS examples) and presto you have a script that runs when the ammunition "explosionEffects" (or craterEffects) runs! There is also a "beforeDestroyScript" setting but I am not exactly sure when that fires. It doesn't seem to do anything for me. So what I have created is a rocket (in this case a SMAW rocket) that produces a smoke effect on impact. :) Here is my example: class CfgCloudlets class CfgCloudlets { class Default; class WPCloud: Default {}; class pook_Effects_SmokeShell: WPCloud { // everything but the following are inherited from the WP Cloud effect... timerPeriod = 1; size[] = {5, 10, 18, 24, 27, 30, 32, 33}; color = {{1, 1, 1, 1}, {1, 1, 1, 0}}; onTimerScript = "\pook_gl\data\scripts\smokeshell.sqf"; beforeDestroyScript = "\ca\data\ParticleEffects\scripts\WPTrail.sqf"; }; }; class pook_Effects_SmokeShell // this can contain numerous entries depending on what you want the explosion (or crater!) effect to do. For example the WP rounds have 2 things that happen - the white cloud and the WP trails. It is unclear how many can be done at once; I tested with 6 and it didn't seem to work correctly. The BIS entries usually have 1-3 entries. class pook_Effects_SmokeShell1 { // arbitrary name that must be unique simulation = "particles"; type = "pook_Effects_SmokeShell"; // this refers to the cfgCloudlets entry position[] = {0, 0, 0}; intensity = 1; interval = 1; lifeTime = 1; }; class CfgAmmo ... class pook_smoke_SMAW_NE_ammo: pook_SMAW_NE_ammo { hit = 5; indirectHit = 2; indirectHitRange = 0.2; explosioneffects = "pook_Effects_SmokeShell"; }; ... Finally, my smokeshell script fired from the "onTimerScript" setting: smokeshell.sqf private ["_rocket","_smoke"]; _rocket = _this; _smoke = "G_40mm_Smoke" createvehicleLocal _rocket; Incidentally, craters appear to be automatically generated by the "craterShell" class in cfgCore... Edited December 13, 2012 by hcpookie Share this post Link to post Share on other sites