Mike84
Member-
Content Count
208 -
Joined
-
Last visited
-
Medals
Everything posted by Mike84
-
parameter bug when using floats as default value
Mike84 posted a topic in ARMA 2 & OA - TROUBLESHOOTING
There's a bug with the new parameter system when floating point numbers are being used as default param values. part of my description.ext class TimeOfDay // 0 { title = "Time of Day"; values[] = { 5, 7, 12.5, 16, 19, 0 }; texts[] = { "Early Morning", "Morning", "Midday", "Afternoon", "Evening", "Night" }; default = 12.5; }; class Weather // 1 { title = "Weather"; values[] = { 0, 0.5, 0.9 }; texts[] = { "Clear", "Overcast", "Rainy" }; default = 0.9; }; And this is what you'll see in the parameter menu: Value of paramsArray in-game (you can see it is rounding the value): [12,1] The funny thing happens when you set the settings yourself: Value of paramsArray in-game: [12.5,0.9] Thanks in advance, mike- 1 reply
-
- 1
-
-
How to make a basic Briefing in ArmA 2 In ArmA 2 BIS has decided redo the briefing system. The well known 'briefing.html' is still being used, but only for the debriefing. The actual briefing is added by script commands, which I advise you to put in a 'briefing.sqf', and give you the ability to add 'Notes' and 'Tasks' to the briefing menu. Ok, let's start with the simple stuff. Make a file called 'briefing.sqf' and make sure this gets executed through the 'init.sqf'. Add the following to your init.sqf: execVM "briefing.sqf"; Now we can add the briefing commands to the briefing.sqf file, and keep the other files of your mission clean. Adding Notes: player createDiaryRecord ["Diary", ["Title 1", "Message 1"]]; This adds a note called 'Title 1', and when you click on that a bigger message screen comes up with 'Message 1'. This is great, but we really need some formatting and ability to add links and pictures. Linebreak/newline: <br/> Ampersand: & Link to marker: <marker name='obj1'>Link to Marker</marker> Show an image: <img image='somePic.jpg'/> Show an image and manipulate the image width and height: <img image='somePic.jpg' width='200' height='200'/> Some examples: player createDiaryRecord ["Diary", ["Title 2", "Isn't whitespace awesome? <br/><br/><br/>Yes it totally is!"]]; player createDiaryRecord ["Diary", ["Title 1", "We have an objective <marker name=mkrObj1'>here</marker> and one <marker name='mkrObj2'>there</marker>]]; Ok, you should now understand how to make a note, and what the possibilities are in the briefing message window, so let's add some tasks. Adding Tasks You can make tasks whenever you want (at mission start, or at any time you like duing a mission), and you can customize them a lot, but let's start with a simple one: tskExample1 = player createSimpleTask ["Task Title 1"]; This add only adds a task called 'Task Title 1', but the message box is empty. We fix this with the following command: tskExample1 setSimpleTaskDescription ["Task Message 1", "Task Title 1", "Task HUD Title 1"]; This sets a description to the task. The first array element is the message (like the message from the notes), the second element is the title (yes, we already defined that, but we have to redefine it here), and the third element is what gets shown on the HUD. Note: The formatting tags that I've shown you earlier work with tasks as well. So now that we have a task with a title and message, we can also add an objective marker to the task so we know where the objectives actually are: tskExample1 setSimpleTaskDestination (getMarkerPos "mkrObj1"); Make sure you have an empty marker called 'mkrObj1', and you'll see a semi-transparant circular marker which will light up when you set the task as active. Other commands Well,now you know how to make notes and tasks, but we also need to control those tasks during the mission. We force a task upon a player by executing this on his machine: player setCurrentTask tskExample1; This will highlight the objective marker, and show him the through the HUD where the objective is. Now all that there's left, is setting the task status: tskExample1 setTaskState "SUCCEEDED"; tskExample1 setTaskState "FAILED"; tskExample1 setTaskState "CANCELED"; tskExample1 setTaskState "CREATED"; "SUCCEEDED" = Makes the checkbox green "FAILED" = Puts a red cross in the checkbox "CANCELED" = Puts a grey diagonal line through the checkbox "CREATED" = Clears the checkbox (makes it look like you've just created it) You can also show the state of the task with the taskHint command, but since that command is kinda hard to use, we're gonna use a function that I've made to make a lot easier to show the task state. How to make task hints If you wanna make taskHints that look like this: then go and grab my taskHint function at http://www.ofpec.com/forum/index.php?topic=33768.0 And that's pretty much it for a basic briefing. I'll try to add more advanced stuff to it when I have some more time. Templates I've made briefing.sqf and briefing.html templates. Grab them at ofpec: http://www.ofpec.com/forum/index.php?topic=33468.0
-
You brought Americans and their love for Fox News up, so don't change the subject now. Btw, if you wanna make such claims, at least back it up with some proof, otherwise you're kinda acting like a moron
-
It wouldn't be a Walker thread if certain people, in this case even Europeans (!), would scare me with their ideas. @Baff1, I'm happy you're comparing Iran with certain morally bankrupt countries in Africa. Kinda destroys the point you were trying to make no?
-
I doubt the pbo won't work on OA
-
No, it says a lot about the person posting such BS.
-
The Russian naval base in Tartus has been there since 1971. How many times has Syria been attack by Israel since? Right...
-
DisableAI "AUTOTARGET" not working
Mike84 replied to Funkman's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Another possibility is getting the projectile with a fired eventhandler, and then setpos it somewhere around the guy. -
First of all, press tv? Come on Walker, I value you higher than that... Secondly, the Armenian holocaust debate started every time the Turkish and Israeli government had a hissy fit, this is hardly "shocking!". And yes, maybe your evil powers of persuasion are not that strong, but your power of humour is increasing with suggesting Armenia as an air corridor :D
-
DisableAI "AUTOTARGET" not working
Mike84 replied to Funkman's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That's indeed what I was saying. Feel free to ignore me next time CG. -
I still don't see any difference to any other day in the middle-east walker. Israel launches a new observation satellite every year or so, and I'm sure you have been "theorizing" long enough to hear about Israeli listening posts in Azerbajan and Turkmenistan. So far your attempts of shocking us into WW3 mode have failed. Besides, you really think Israel would ship their most advanced shit to Georgia, and even make a base there? Why would Israel want to piss off Russia who keep refraining from giving Iran S-300's, and did this author forget about the IAF raid on Syria already? It has been barely 3 years ago....
-
DisableAI "AUTOTARGET" not working
Mike84 replied to Funkman's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
And you understand what disabling AUTOTARGET actually does right? It disables the pursuit of enemies iirc. Another thing, it only works with infantry units, so it's no wonder it doesn't work with a tank. -
Sorry walker, but all those news stories are just a collection of any other ordinary month in the middle-east. I'm sure if you'd hit the news archives, like circa 2005 you'll find news articles that have more or less the same "shock" value for you. But anyway, if you do wanna continue to spend time on your latest conspiracy theory, you might wanna check on which CSG the Truman CSG is supposed to replace in the middle east. If they're not replacing anyone at all then I might just take this thread a bit more serious. Btw, news media needs to stop reporting on Israeli warships going through Suez without providing any proof. If it really happened then there would've been pictures. The canal is not void of civilization there...
-
Pics or it didn't happen. It might have just been the German ship that is part of that fleet that they've seen.
-
Alternative AddAction Syntax
Mike84 replied to Big Dawg KS's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hideOnUse is to hide the action menu if you've used the action -
Alternative AddAction Syntax
Mike84 replied to Big Dawg KS's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You can also use the "_target" variable in your condition which is set to the object you attached the action to. Not really necessary, but it can make your condition a bit shorter. I didn't know that you could also use the "_this" array in the condition, thanks for the tip :) -
I use kegetys' cpbo
-
You've predicted so many outcomes for this single incident walker, that you're bound to be right some time, kinda like a broken clock. Btw, I expected you to report about this, but maybe you're becoming too 'selective' in choosing your stories.
-
Task update for Dummies!
Mike84 replied to maltti's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Please don't do that. Only let 1 client or let the server execute a publicVariable command, unless you prefer to have a potential desync bomb. -
This isn't "protected" at all. I've used this debugger for a year now, and put in some fixes and new features in it without any problems. If you can't extract it properly you should blame your pbo extractor, not the author.
-
Do Germany-Poland-UAE have extradition treaties with eachother?
-
The media says it's an Israeli national. Stay up-to-date walker!
-
Doesn't every country plead not to extradite one of their citizens to a different country?
-
You 2 should get married :p btw, what genocide?
-
Add an action to the ADMIN player on a MP server
Mike84 replied to ker8er0s's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Btw, I see now that your code example was in sqs, and my example is in sqf. You're gonna need someone to translate this in sqs, or put this in a sqf script. processPlayers.sqf mk4_players = []; mk4_UIDs = []; { if ( isPlayer _x ) then { mk4_players set [count _players, _x]; mk4_UIDs set [count _UIDs, parseNumber(getPlayerUID _x)]; }; } forEach playableUnits; Now execute the script from somewhere: [] execVM "processPlayers.sqf"; And now you'll have 2 global arrays (mk4_players and mk4_UIDs) that will contain the things you wanted. I tested it and it works fine.