OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Aldo15 on 27 Sep 2012, 23:02:12
-
So Hey Everybody,
Well, I need some script to change Smoke shell colors, I mean, Throw a smoke shell with desert color or pink or whatever, not default. To me, default is: (Gray,Green,Red, etc)
Is it possible?
Cheers
Aldo15
-
It is possible. You could try looking for an addon that provides different coloured smoke. But, you could also accomplish it through scripting. You would have to make use the 'drop' command. The best places to find out how to make custom smoke would be to look at the various fire scripts out there, e.g. vitja3000's fire and explosion scripts, CAT Fires etc.
-
Yep, I was thinking the same, but the problem is I dont know anything about script like that one, you know, I just know the basic.
-
The only script that I have which is capable of producing coloured smoke is Haroon1992's volumetric fog script. With a little tweaking, you can have coloured fog at one specific location (like the location of a gamelogic, or coordinates).
I believe the script is in his Operation Spark mission. I'm sure he won't mind you tweaking it, but I would probably ask him just to be sure.
The effect won't be exactly the same as a smoke shell. You would have to make a simple addaction and move the fog gamelogic (assuming you're using a gamelogic) to the player's position. You could then add a few sound effects.
With a bit more complex scripting, you could have the 'throw grenade' animation and have the fog spawn several metres in front of the player. I'm not entirely sure how to do this off the top of my head. You would need to find out the dir of the player, and setpos the gamelogic some distance in front of the player. I'm guessing you would need to do trigonometry (sin, cos, tan) to do this, but trig is one of my weaker areas. I know the command 'atan2' is used, just not entirely sure of how it would be written.
I'll try and find an example. Someone here with better knowledge of trigonometry than me will probably be able to help more.
EDIT: .........or you could just find and download a coloured smoke addon :D
-
Well, I'll try to test haroon's mission, but Im not sure if I can make it myself. I think there're not addons that make that effect. I dont reeally want a smoke shell effect. Look, Im making a mission where an aircraft sends its shells, so I want an effect like desert dust when the tanks be destroyed by the shell. I dont know if you're understand.
Cheers
-
I think I understand what you want. Correct me if I'm wrong, so you would like a dust effect to appear when a tank is destroyed?
I'm pretty sure there are dust effect addons out there. You just have to search ;)
If you don't want to download an addon, which I can understand, then I would suggest you have a look at the various dust effects scripts lying around the editors' depot. Vektorboson's chopper dust script springs to mind.
You'd be surprised how much you can learn from opening up other addons/missions, and seeing how the creators used certain commands and functions.
-
So I think you've played call of duty 4 when paul jackson dies by a nuclear bomb. So when you play it, an dessert dust appears, simuling an desert storm effect, that's What I want when tanks are destroyed.