Home   Help Search Login Register  

Author Topic: Changing Colors  (Read 1693 times)

0 Members and 1 Guest are viewing this topic.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Changing Colors
« 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
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Changing Colors
« Reply #1 on: 27 Sep 2012, 23:10:22 »
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.

"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Changing Colors
« Reply #2 on: 27 Sep 2012, 23:24:53 »
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.
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Changing Colors
« Reply #3 on: 28 Sep 2012, 10:30:15 »
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
« Last Edit: 28 Sep 2012, 10:34:05 by Gruntage »
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Changing Colors
« Reply #4 on: 28 Sep 2012, 14:56:00 »
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
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Changing Colors
« Reply #5 on: 28 Sep 2012, 18:25:49 »
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.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Changing Colors
« Reply #6 on: 28 Sep 2012, 18:54:06 »
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. 
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom