Jump to content
Sign in to follow this  
dmarkwick

DMSmokeEffects Beta 4

Recommended Posts

Dont the MAP_Misc smokes have viewblock already? Been too long I had a look into those smile_o.gif

Share this post


Link to post
Share on other sites
Dont the MAP_Misc smokes have viewblock already? Been too long I had a look into those smile_o.gif

They do but you need to add stuff into missions to get them to work IIRC. Like triggers or logic units or something. My goal is to have viewblock smokeshells just by having the addon.

Share this post


Link to post
Share on other sites

Does viewblock not work with class Thing ?

If it does you can predict how it will float by using the correct amount of mass in its geometry, maybe try to match it with the mass in your smoke particle so it will rise with it.

other than that you can use the ontimer script and send the particle co-ords as an array and simply setpos your view blocker there ?

Share this post


Link to post
Share on other sites
Does viewblock not work with class Thing ?

If it does you can predict how it will float by using the correct amount of mass in its geometry, maybe try to match it with the mass in your smoke particle so it will rise with it.

Unfortunately the smoke particles always have different properties for each burning vehicle.

other than that you can use the ontimer script and send the particle co-ords as an array and simply setpos your view blocker there ?

That's how it's done right now for the main smoke effects smile_o.gif unfortunately the SmokeShells do not have onTimer functionality.

Share this post


Link to post
Share on other sites

shame about that and you cant add eventhandlers to ammo class either iirc ?.

maybe you can however create your own custom "explosioneffect", i have not personally gone that deep back into the config but i am sure you can create your own custom effects by over riding the originals or even better custom ?

to clarify i mean , for example smokeshell

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

...................

class CfgAmmo

{

class SmokeShell;

class ofp2Smoke: SmokeShell

{

model = "\ofp2Smoke\nadeofp2.p3d";

hit = 1;

indirectHit = 2;

indirectHitRange = 0.200000;

cost = 10;

simulation="shotSmoke";

explosive = 1;

deflecting = 60;

explosionTime = 2.1;

explosionEffects="myveryownExploAmmoExplosion";** < you can create own ?

timeToLive = 12;

soundHit[] = {"",0,1};

smokeColor[]={0.1,0.1,0.1,1};

lightColor[]={0,1,.2,0};

};

class ofp2smokenew: ofp2Smoke

{

smokeColor[]={0.1,0.1,0.1,1};

};

............

**i am experimenting with something else different myself.

but is it not possible that you can create your own explosion effect that will incorporate your view block there ?

Share this post


Link to post
Share on other sites

Quite possbible I suppose smile_o.gif I'd need to see a successful example I can copy though as I don't have too much of a clue about explosioneffects property.

Share this post


Link to post
Share on other sites
Quite possbible I suppose smile_o.gif I'd need to see a successful example I can copy though as I don't have too much of a clue about explosioneffects property.

Check out my mods config for an example smile_o.gif

Don't think it does anything with smokeshells though, since they don't 'explode'. I think it would take some more scripting. Remember JAM for OFP? It used a fired eventhandler to pick up the shell and spawn a viewblock object where it landed.

Since the smokeshells in ArmA bounce you should make sure the viewblock object moves with it.

Share this post


Link to post
Share on other sites
Quote[/b] ]Don't think it does anything with smokeshells though, since they don't 'explode'.

Hmm good point , but it /they will however explode if you add that parameter so in essence his new effect maybe a particle script that he can attach his viewblocker ?

i tried that config on a custom smokeshell and the little explosion effect worked so in principle upto the creating your own effect it will work .

About the adding an eventhandler thats a good idea but when and where do you init the "find" smokeshell ? if it is from all units on map then he may as well just use a custom game logic in the beggining and add a fired eventhandler to all units and use something like kyle sarnik used to use.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers

{

Fired="_this exec ""\ofp2moke\scripts\fired.sqs""";

fired.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0

_ofp2nade = _this select 4

? _ofp2nade in ["ofp2smokeshell"] :_this exec "\ofp2Smoke\scripts\startviewblock.sqs"

exit

at which point you attach your particle to the nade ?

anyway good luck i look forward to this.

Share this post


Link to post
Share on other sites
Hmm good point , but it /they will however explode if you add that parameter so in essence his new effect maybe a particle script that he can attach his viewblocker ?

i tried that config on a custom smokeshell and the little explosion effect worked so in principle upto the creating your own effect it will work ....

It will create 'explosions' as it bounces on the ground. Wont work right for smoke shells. Stick to class smoke for the smoke effect.

Fired eventhandlers can be added the same way the other mods are doing it, with the extended eventhandlers addon. And picking up the smokeshell is done with the nearestobject command - although the extended fired EH addon does that for you and passes that to the script. Example is included with the extended EH addons.

Share this post


Link to post
Share on other sites

k ,thanks for explanation

your right to stick to default.

Share this post


Link to post
Share on other sites

Hmm. OK I'll try out the addEventHandler "fired" method as it seems to have most chance of success, even though I'm reluctant to add an event for such an unlikely event wink_o.gif As soon as I get a working version I'll ExtendedEvent the addon (which I haven't done yet) & release a new version.

Share this post


Link to post
Share on other sites

Ha-haa smile_o.gif

OK, it's a little bent out of shape yet, in that if it's windy (as in the video) the viewblock won't line up exactly, but I can work on that. The block might seem a little big, but actually it pretty well covers exactly the same amount of ground as the smoke shells do.

Share this post


Link to post
Share on other sites

Cool, looks great! What's it like if you view it from close up? It seems as though the AI were able to see you through it, and return fire.

Share this post


Link to post
Share on other sites

<leaning back with a smile> NICE!

Only thing to be tuned -as you mentioned already- is the shape and wind direction influence. I was thinking... would it be easiest to define a bar type shape of that size and "fix" the axis to the spot where the smokeshell exploded. Depending on wind directions you could rotate that object easily with it.

VictorFarbau

Share this post


Link to post
Share on other sites
Cool, looks great! What's it like if you view it from close up? It seems as though the AI were able to see you through it, and return fire.

Well I think it's possible for AI to see out of it if they're inside it, which is OK.

Share this post


Link to post
Share on other sites
<leaning back with a smile> NICE!

Only thing to be tuned -as you mentioned already- is the shape and wind direction influence. I was thinking... would it be easiest to define a bar type shape of that size and "fix" the axis to the spot where the smokeshell exploded. Depending on wind directions you could rotate that object easily with it.

VictorFarbau

I'm thinking that maybe some sort of rounded capsule shape would be best for smokeshells, allowing me to either use one rounded end when there's no wind, or to lean it upwind to get an elongated viewblock along the length of the drifting particles. I will be a long time fiddling with this (as testing is difficult as wind is not controllable or settable), so I'll try to make an interim release with basic smokeshell viewblock first.

Share this post


Link to post
Share on other sites
Cool, looks great! What's it like if you view it from close up? It seems as though the AI were able to see you through it, and return fire.

Well I think it's possible for AI to see out of it if they're inside it, which is OK.

Maybe you could make a smaller "inner shell" that AI cant look out from? That way they cant look into the smoke, but they can look out unless they are deep into the smoke.

Share this post


Link to post
Share on other sites

DMarkwick, I am continuing to think out loud. Wind is a x,y,z array. To test you could just use random sensible values through time. The shape could also be a torus - that way you automatically always have a viewblock depending where you stand. On the edges you'll be able to see through to the outside; more in the middle you won't.

Wind directions will need to influence the shape though, that is the tougher part. Strong winds will cause the particles to drift further and the viewblock will need to stretch out, no wind will require a simple pillar.

On the bright side you could easily use different viewblock objects that match the necessary shape best - it's not timecritical. You could delete one and place another one when needed.

Cheers,

VictorFarbau

Share this post


Link to post
Share on other sites
DMarkwick, I am continuing to think out loud. Wind is a x,y,z array. To test you could just use random sensible values through time. The shape could also be a torus - that way you automatically always have a viewblock depending where you stand. On the edges you'll be able to see through to the outside; more in the middle you won't.

Wind directions will need to influence the shape though, that is the tougher part. Strong winds will cause the particles to drift further and the viewblock will need to stretch out, no wind will require a simple pillar.

On the bright side you could easily use different viewblock objects that match the necessary shape best - it's not timecritical. You could delete one and place another one when needed.

Cheers,

VictorFarbau

Or you could use 2 viewblocks. One just placed in the middle and one higher up moved towards the wind. They wont collide with each other so it doesn't matter if they clip through each other.

JAM for OFP never did anything about the wind though. It's not actually a big deal IMO.

Share this post


Link to post
Share on other sites

The solution I'm thinking of will be based around a simple capsule shape. Octagonal or hexagonal curves (not circular as in the illustration) to keep it as simple as possible. The higher the wind value the more the capsule leans, and the more directional the viewblock effect.

It will be as simple as I can make it, I'm not going to worry about units within the viewblock object as it's really an unimportant detail in the scheme of things. But I would like players to think about wind effects when arranging for smoke cover across the street for example smile_o.gif I got a nice little wind information script all ready to include as an action, I wrote it up for weapon windage useage but it will be fine for this too.

CapsuleVB.jpg

Share this post


Link to post
Share on other sites
Go for it DMarkwick. Be assured you'll find some critical testers wink_o.gif

VictorFarbau

LOL, that doesn't bother me, I do it all for myself biggrin_o.gifwink_o.gif

Share this post


Link to post
Share on other sites

I think I got the wind reactive code mostly licked now, there's just a small problem with the viewblock object rotating around the center of it's mass rather than around what I thought was the model's pivot point.

is the test video. Shows the object reacting to two wind situations, wind info is in top-left (if you can read it.) First test is wind at 40 degrees @ 3.3 strength, second one is 331 degrees @ 1.2 strength.

Share this post


Link to post
Share on other sites

Looking at it I love it. The shape seems to perfectly fit the smoke trail. Any more issues with it? (release release xmas_o.gif ).

Alternatively you could start a "Hindenburg" mod with this thing wink_o.gif

Regards,

VictorFarbau

Share this post


Link to post
Share on other sites
Looking at it I love it. The shape seems to perfectly fit the smoke trail. Any more issues with it? (release release xmas_o.gif ).

Alternatively you could start a "Hindenburg" mod with this thing wink_o.gif

Regards,

VictorFarbau

LOl, yeah I thought of dirigables as well smile_o.gif

The only issues I had are already solved. The viewblock now rotates at it's proper pivot point, and also the viewblock object reacts to changes in wind during the shellsmoke lifetime. This does happen as I noted several times in testing. Now, the viewblock will always match the smoke volume reasonably closely smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×