Jump to content

Recommended Posts

Sorry for my noobness, I love this effect, (kudos to the creator) and really want to use it.

How do i install this and which menu would I find it under in the editor?

Share this post


Link to post
Share on other sites

None.

You put the script in the same folder as mission.sqm already created in the editor

Then f.e. you put what's written in the first post into an init field of whatever unit/object you wish to have fog around - just replace 'l1' with 'this'

Share this post


Link to post
Share on other sites
The fog will be created only on the client-side, never on the server-side and the server will not synchronize the fog.

Could not synchronize to make it realistic? and all have the same fog at the same time.Thanks

Share this post


Link to post
Share on other sites

I think it would be the best if the script took the wind into account. It's a simple matter of wind select 0 for x and wind select 1 for y if you don't want to make the particles themselves be affected with the scalable "rubbing" value. The cloud size could use some randomizing, maybe have values for minimum and maximum sizes.

Also, I'm not sure what causes it but the minimum distance doesn't seem to be working. Clouds spawn next to me even if I set it to 200 meters. I did spot a small error in defining the radius, namely that _distanz+random (_xdistanz) can spawn clouds farther away than the indended maximum distance, and it can be fixed with _mdistanz+random (_xdistanz-_mdistanz).

Edited by Celery

Share this post


Link to post
Share on other sites
Could not synchronize to make it realistic? and all have the same fog at the same time.Thanks

It would cause to much lags! But if you call the script once! with 'Player' for the first option, all players should have approximately the same fog (but only around the player).

I think it would be the best if the script took the wind into account. It's a simple matter of wind select 0 for x and wind select 1 for y if you don't want to make the particles themselves be affected with the "rubbing" value.

In the next version will be a option for the wind effect.

The cloud size could use some randomizing, maybe have values for minimum and maximum sizes.

In the next version will be a option for this too

Also, I'm not sure what causes it but the minimum distance doesn't seem to be working. Clouds spawn next to me even if I set it to 200 meters.

The Problem is: "_radius*(sin(random 360))"->"_radius*(can be smaller than 1)" and "_radius*(cos(random 360))"->"_radius*(can be smaller than 1)", but you need it for the random positions of the clouds.

I did spot a small error in defining the radius, namely that _distanz+random (_xdistanz) can spawn clouds farther away than the indended maximum distance, and it can be fixed with _mdistanz+random (_xdistanz-_mdistanz).

Thanks, I will fix it for the next version

Edited by Rockhount

Share this post


Link to post
Share on other sites
The Problem is: "_radius*(sin(random 360))"->"_radius*(can be smaller than 1)" and "_radius*(cos(random 360))"->"_radius*(can be smaller than 1)", but you need it for the random positions of the clouds.

I found the problem. You have to define a single random direction that is the same for both axes.

Like this:

_randomdir=random 360

[_radius*sin _randomdir,_radius*cos _randomdir]

Share this post


Link to post
Share on other sites
I found the problem. You have to define a single random direction that is the same for both axes.

Like this:

_randomdir=random 360

[_radius*sin _randomdir,_radius*cos _randomdir]

Thanks, I will fix it for the next version.

Share this post


Link to post
Share on other sites

The wind value could be a floating number instead of a boolean to allow customizing the effect that the wind has on the clouds. For example, 0.5 would transfer half of the wind speed to the cloud.

The lifetime could use some randomizing and it would look better if new clouds spawned gradually instead of in bunches set by the spawning interval.

Share this post


Link to post
Share on other sites
The wind value could be a floating number instead of a boolean to allow customizing the effect that the wind has on the clouds. For example, 0.5 would transfer half of the wind speed to the cloud.

In the next version will be a option for the wind-strength.

The lifetime could use some randomizing

In the next version will be a option for this too

and it would look better if new clouds spawned gradually instead of in bunches set by the spawning interval.

You can set the same effect with 10 clouds every 0.1 seconds, which can be set already with version 1.0-1.6 . Less respawntime would cost to much performance.

Edited by Rockhount

Share this post


Link to post
Share on other sites

When I copy the example into the initialization field of my unit, I still don't see fog.

And yes, fog.fsm is in the mission folder.

Share this post


Link to post
Share on other sites
When I copy the example into the initialization field of my unit, I still don't see fog.

Please read the manual before ask a question.

...after that replace 'l1' with 'Player' and save the mission.
Edited by Rockhount

Share this post


Link to post
Share on other sites

so if it's client side only, there's no way for me to play coop missions with this fog? cose iam always the serverside lol. thats kinda sad =\

Edited by CptFlowers

Share this post


Link to post
Share on other sites

It will appear on your machine if you are the server AND client !

Edited by Kremator
spelling

Share this post


Link to post
Share on other sites

It will only not run on the dedicated-server-side.

There is no (isServer) scheck, there is only a (isDedicated) and (!(isDedicated)) condition, because (isServer) is always true in the Editor,SP,Direct Host, otherwise you wouldn`t be able to see the fog in the editor.

So when you can see the fog in the editor, than you will see the fog as non-dedicated-server too!

Edited by Rockhount

Share this post


Link to post
Share on other sites

Thanks, now it's exactly what my zombie mission needed. :)

Share this post


Link to post
Share on other sites

Nice effect!

How can you stop the script other than deleting the marker or killing the unit? (If it is just an effect around the player.)

Can I somehow modify the intensity real time? Like to fade out or fade in...

If I call the script again will there be 2 running or later cancelling the previous? I know basically nothing about fsm-s.

Edited by zapat

Share this post


Link to post
Share on other sites
How can you stop the script other than deleting the marker or killing the unit?

Without changing the script for yourself, you can only stop the script if the marker/unit/player was deleted/died or the stated ingame-time passed

Can I somehow modify the intensity real time? Like to fade out or fade in...

It`s not possible without changing the script, so its very complicated, but it would cost to much performance, otherwise the engine would create 50-300 clouds per second and (with your request) it would change 400-5000 values at the same time

If I call the script again will there be 2 running or later cancelling the previous? I know basically nothing about fsm-s

Yes, when you call it twice, the script will runs twice too

Share this post


Link to post
Share on other sites

Sorry to bring this up but I just tried this script on a dedicated server and none of the clients have the fog around them. Is this something to do with the "player" init? Is there another way to call it for MP because it doesn't seem to work.

Thanks.

EDIT: Disregard, managed to use the waitUntil {!isNull player} to sort some issues I was having.

Edited by SafetyCatch

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

×