Danikov Posted December 25, 2013 Share Posted December 25, 2013 As the title says,I want to know how would it be possible to create an .ini file for my script,been looking at some sites how to do so but couldn't understand how this works. I need local variables 7 to 16 have the float values from the .ini file . How do I do it? 0208: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected] Link to comment Share on other sites More sharing options...
aStiffSausage Posted December 25, 2013 Share Posted December 25, 2013 Opcodes 0AF0-0AF5 are CLEO 4 opcodes used to write/read from ini-file, with data-types being integer, float and string. In your case, use 0AF2, like this: 0AF2: [email protected] = get_float_from_ini_file "cleo\config.ini" section "SectionName" key "floatKey" And your ini-file should look like this: [sectionName]floatKey=0.0 "SectionName" refers to, simply, section from where to read the value from, and "floatKey" is the value which to read. Link to comment Share on other sites More sharing options...
Danikov Posted December 25, 2013 Author Share Posted December 25, 2013 That's what I saw previousley,and as I stated,I couldn't understand it,any chance that you explain furherly more about this? Link to comment Share on other sites More sharing options...
aStiffSausage Posted December 25, 2013 Share Posted December 25, 2013 Okay, so, here's a file, which is named "configuration.ini", and we want to read values from it. [section1]FloatValue_1 = 50.0FloatValue_2 = 100.0[section2]FloatValue_1 = 1.0FloatValue_2 = 2.0 So we use 0AF2 to get float values from ini-file. 0AF2: [email protected] = get_float_from_ini_file "cleo\config.ini" section "SectionName" key "floatKey" [email protected] is variable where we will store result -"cleo\config.ini" is path and filename of file we want to read.-"SectionName" is name of the section, under each section, we will have different values.-"floatKey" is the value we want to read.So, to read all the values from the example I made above, we would need to use 0AF2 four times, once for each value we want to read. 0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section1" key "FloatValue_1"0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section1" key "FloatValue_2"0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section2" key "FloatValue_1"0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section2" key "FloatValue_2" Now, [email protected] will store value of FloatValue_1, which is located in file "configuration.ini", under section "Section1". I don't know if I can explain this any better, just try to use this and if you face any problems, then show the script and content of .ini-file and we can have better understanding of what's happening. Link to comment Share on other sites More sharing options...
Danikov Posted December 25, 2013 Author Share Posted December 25, 2013 If I want to change 'FloatValue_1' into 'XForceMin' in the .ini file for example,so I'll have to change in the opcode "floatKey" into "XForceMin" accordingly? Link to comment Share on other sites More sharing options...
aStiffSausage Posted December 25, 2013 Share Posted December 25, 2013 Yes. Link to comment Share on other sites More sharing options...
Danikov Posted December 25, 2013 Author Share Posted December 25, 2013 (edited) Yes. Alright,I'll test it when I get home. Also,I wanted to ask another thing,instead of creating another topic. When I am using the particle "heli_dust" in Opcode 064B,it creates the water variant of this particle,while I want it to be the actual dust variant. I tried all kinds of flag numbers for the particle in the opcode,but no success. How can I use the actual 'dust' particle instead of the water particle? Edited December 25, 2013 by Danikov Link to comment Share on other sites More sharing options...
aStiffSausage Posted December 25, 2013 Share Posted December 25, 2013 I don't have much experience with particles, but since you got it to play, you at least know how to use them. And each effect is defined in effects.fxp, with label "NAME: *EffectNameHere*", so you might need to look through them all to find what you are looking for. As far as I know, only way to preview effects is to try them in-game with a script. And didn't try this in-game, and I don't know if these are Overdose Effects v1.5 only, but maybe try effects "dust" and "bigdust"? Link to comment Share on other sites More sharing options...
Danikov Posted December 25, 2013 Author Share Posted December 25, 2013 I don't have much experience with particles, but since you got it to play, you at least know how to use them. And each effect is defined in effects.fxp, with label "NAME: *EffectNameHere*", so you might need to look through them all to find what you are looking for. As far as I know, only way to preview effects is to try them in-game with a script. And didn't try this in-game, and I don't know if these are Overdose Effects v1.5 only, but maybe try effects "dust" and "bigdust"? This particle is generated underneath aircraft that are powered by vertical thrust. Its that vortex of either dust or water you see when flying very close to the surface. Link to comment Share on other sites More sharing options...
aStiffSausage Posted December 25, 2013 Share Posted December 25, 2013 I know what effect you mean, but well, I have no idea what effect it is. Best way would be, as I mentioned above, to go through the most obvious effects, which sound like they would be related to dirt, helicopter or similar. Link to comment Share on other sites More sharing options...
Danikov Posted December 26, 2013 Author Share Posted December 26, 2013 (edited) I know what effect you mean, but well, I have no idea what effect it is. Best way would be, as I mentioned above, to go through the most obvious effects, which sound like they would be related to dirt, helicopter or similar. Well,nevermind,I think I would not consider to use it for now. I want to attach a particle to a car using the opcode 064B,but I am facing a problem,sometimes cars that are not destroyed,which would return false in my script...have this particle attached to them. Secondly,when the particle is supposed to attach,there's sometimes a few seconds delay,while this attachment shouldn't take even a second... Could it be the particle I am using? help? Edited December 26, 2013 by Danikov Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now