Jump to content

General Barron

Member
  • Content Count

    972
  • Joined

  • Last visited

  • Medals

Everything posted by General Barron

  1. General Barron

    titleText

    Not sure exactly what you are trying to do, but I've got 2 suggestions: #1: look into the "format" command. It lets you print out a variable into a string (for use in titletext, for example). #2: use the newline command: \n. This will make a line break. So maybe in your case, you could do something like this: titleText ["bla bla \n yibity \n yibata", "PLAIN",2]
  2. General Barron

    I 've about had it

    Hehe, I believe it alright. That's why I used the words "In case you weren't aware". I didn't figure it out for a while myself either. Glad things got worked out.
  3. General Barron

    I 've about had it

    If you edit the mission in MP, you will be able to preview and respawns will work correctly. This way you don't have to export the mission every time you want to preview it. In case you weren't aware, you can edit a mission in MP by selecting Multiplayer -> host new game -> new mission (or select an editor mission you have previously saved--they will be yellow instead of green). Missions you are editing will be saved into a different folder under your username then missions edited in SP. I would recommend ALWAYS editing MP missions in the MP editor, since there are a few scripting commands that seem to behave differently in SP then in MP (even with only one player).
  4. Hey cool, I never knew you could have a multi-line textbox, and use \n for newlines! I've always used lots of spaces to go to the next line, which needless to say is crap. That's pretty darn handy in fact...
  5. General Barron

    How to shoot yourself

    Yeah, there is a property defined in every bullet's config that determines how big of a damage radius it has. Basically, they all make little invisible explosions. I've always wondered what would happen if you increased this to something like 10 meters, and decreased the damage to almost nothing. The AI reacts whenever they take damage, so this might make the AI react better when they start taking fire, but don't actually get hit. Something for somebody to experiment with one of these days, if it hasn't been done already.
  6. General Barron

    Handsignals Command System Released!

    Re 'onmapsingleclick': The HS system uses a special script set that makes it easy to manage multiple 'uses' of this command (I'm actually really proud of that script, and think everybody who uses the command should use it). Integrating other scripts that use 'onmapsingleclick' into the HS system is entirely possible--it's just a matter of hunting the command down in the other scripts, and replacing them with the appropriate function call. I can't do much about the ECP though (scripts are outside of the mission directory), except disable the scripts that use 'onmapsingleclick'. I'll look into integrating CE2--I think it should be fairly simple (har har...). I haven't tried Chaos's comm system (sounds similar to what is already in HS), but I'll check it out.
  7. General Barron

    Abandoned Armies 1.4

    Oooh... come to think of it, I do have 'enhanced' ones. I'll switch and see if it makes a difference. Forgot about those. I used to get upwards of 10 fps playing OFP. Now I 'upgraded' my comp, and I get like 12! That's one of the reasons why I don't use many addons. But playing AA still slows it down quite a bit, even without any addons.
  8. General Barron

    Handsignals Command System Released!

    Thanks for the suggestions. Actually, I've been working on v1.1, and your suggestion has already been implemented (and yes, it was easy ). Here are some of the improvements I have/am implementing for v1.1: -Menus stay at the current menu after an order is given. -No delay between issuing orders--orders are instead added to a 'queue' as you click on them, and then issued in sequence. -Enhanced Fwatch functionality: now you can assign nearly any key to nearly any HS-related task. This is configured via an external file, edited by the player, which stays the same across missions. -Expanded options for mission editors (more teams available, naming of teams, etc). I really like the Fwatch bit (wasn't even my idea). It makes the game super-easy to control. For example, you can assign "tab" to open up the command dialog, "backspace" to go back to the root of the command menu, "F1" to order a rally, etc etc. Again, all of this is fully customizable by the player. I don't have a release date, especially since I just started school again. But know that there is progress being made towards a new and improved version.
  9. General Barron

    Abandoned Armies 1.4

    Well, I got a *slight* upgrade to my crappy computer, and I've picked up this mission again. Yippee, sometimes I get 8 fps now! Anywhoo, I'm running into the same error some others have hit. I get this message when I start the mission: It only seems to happen if I abort the mission and start it again. That is, if I load OFP and start this mission, I get no errors. But if I hit 'retry' (before saving), or abort and restart the mission, I get the error. I hope it isn't vital to the mission, because I've continued on regardless. But now I'm running into a second problem. I got to the mountain lodge, listened to the radio, and drove a truck out to the civillians alone. Then I got back in the truck, waited until the resistance fighter said "okay we're all in", and drove back to the lodge. But when I get out of the truck, the civillians just keep following me! I've tried running all over the lodge area, to no avail. What is supposed to happen? What makes the objective 'tick' off? Could one civillian have been left behind somehow (even though the leader said it was clear)? How many civillians am I supposed to have with me? I have 2 females, 2 males, and the resistance fighter.
  10. General Barron

    Artillery Strike

    This was my first impression when UA came out, but it is short-sighted. The important thing isn't that the shells have true trajectories, although that is a nice little feature (makes it impossible to drop shells on the far side of some hills, for example). The real power behind UA is the fact that the shells are actually fired by a unit. OFP treats stuff fired by a unit different than it treats camcreated stuff. The AI doesn't care if it is killed by camcreated shells. When hit by actually fired stuff, the AI (a) reveals the shooter, and (b) reacts by going into combat mode, trying to kill the shooter, etc. So, let's say the player has access to arty support. If you use camcreated arty, enemies basically won't do anything in reaction to such an attack. The best you can do is some scripted workaround to at least get them to pull their weapons off their shoulders. If you use UA arty, enemies will react to it in a way similar to a tank just rolling up and shooting them. They will all go into combat mode, units with 'guard' waypoints will start moving around, 'detected' triggers will fire properly, etc etc. ------- So basically I'm all for CoC arty, unless arty plays a very small role in a mission, or I'm trying to go for no addons. Especially when the player gets arty support, UA makes the AI react a whole lot more realistically. But yes, it is a bit complex, so for beginners, stick to a good script (I like fisions generic arty script myself).
  11. General Barron

    Artillery Strike

    This was my first impression when UA came out, but it is short-sighted. The important thing isn't that the shells have true trajectories, although that is a nice little feature (makes it impossible to drop shells on the far side of some hills, for example). The real power behind UA is the fact that the shells are actually fired by a unit. OFP treats stuff fired by a unit different than it treats camcreated stuff. The AI doesn't care if it is killed by camcreated shells. When hit by actually fired stuff, the AI (a) reveals the shooter, and (b) reacts by going into combat mode, trying to kill the shooter, etc. So, let's say the player has access to arty support. If you use camcreated arty, enemies basically won't do anything in reaction to such an attack. The best you can do is some scripted workaround to at least get them to pull their weapons off their shoulders. If you use UA arty, enemies will react to it in a way similar to a tank just rolling up and shooting them. They will all go into combat mode, units with 'guard' waypoints will start moving around, 'detected' triggers will fire properly, etc etc. ------- So basically I'm all for CoC arty, unless arty plays a very small role in a mission, or I'm trying to go for no addons. Especially when the player gets arty support, UA makes the AI react a whole lot more realistically. But yes, it is a bit complex, so for beginners, stick to a good script (I like fisions generic arty script myself).
  12. General Barron

    Custom Animations

    Anims are perhaps one of the least understood parts of OFP editing. At least, there are the fewest number of new breakthrus in this area, and by far the least amount of tutorials available. Keep this in mind as you try and learn about them, because there isn't much help available to you. Anyway, to make the .rtm (animation) files for soldiers, you will need a program called OFPanim (or you can use Maya, a commercial animating program). Download links and a few tutorials can be found at this site: http://ofp.gamepark.cz/_hosted/animcenter/en/index.php After you've made your .rtm file, you will then need to configure the file for use in game (just like you need to write a config to get a .p3d model in game). This is the hardest, most frustrating, and least understood part. There is one small tut on the above website. I started making a comprehensive tutorial on the subject a couple years ago, but never got around to finishing it. I would hate to let the work I have go to waste, so I'll post it for temporary download by anyone interested. Link: http://rapidshare.de/files/16109965/anim_config_tut.zip.html Remember, this tutorial is nowhere near complete! Nor do I have all the answers. If anyone knows anything about the subject and would like to help me help the community, let me know and we can try to complete it.
  13. General Barron

    Fonts

    I'm pretty sure they have to be configured in the game's core config, or at least in an addon. So aside from that, or faking it via pictures, I don't think so.
  14. General Barron

    Setcombatmode

    Yes, when a group spots enemies, they will automatically go into combat mode. The only exception is when they start out in 'stealth' or 'careless' modes (then they stay in those modes). This is verifiable via the 'combatmode' scripting command. So when making waypoints, there is no need to have 'combat mode' waypoints, unless you absolutely know where they will be assaulting. Just keep em on 'aware', and they will switch to 'combat' when the time comes.
  15. General Barron

    Redundant PBO's ?

    The res folder is essentially a mod folder. Just like any other mod folder, whatever is in there overwrites the normal stuff. So, as stated, you only need stuff in the root OFP directory if you are planning on playing v1.46. (Same could be said for duplicate addons in the 'addon' directory)
  16. General Barron

    setobjecttexture in MP

    I think I've heard that animationphase doesn't work at all on a dedicated server (Well, it will always return '0'. Or maybe it won't work on any client in MP when using a dedicated server. Or something. Basically, it won't work in MP. As far as setobjecttexture, that might have to be done locally on every client in order for them to see it. So, basically it looks like you will have to somehow broadcast the fact that the nets are being deployed. If player A deploys the nets, he will have to broadcast that fact to players B,C,D, etc. How exactly to broadcast this could get kinda tricky, especially if you have more than one active at a time. One way to do it: Have ONE 'monitor' script running on every client's machine. No matter how many PUKF vehicles are placed on the map, make sure only ONE script gets run per client. This script looks exactly like the one you already have, only at the very top it has this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #top @PUKF_camnet_deploy == PUKF_camnet_deploy _vehicle = PUKF_camnet_deploy _type = typeof _vehicle PUKF_camnet_deploy = nil ?(_type == "UKF_WMIK") : goto "wmik" .... You also need 'goto' statements that loop back to the beginning of this script (after deploying the nets). Then, you have this in the 'action' script that is run by the player deploying the net (via useraction or scripted action): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">PUKF_camnet_deploy = _this select 0 publicvariable "PUKF_camnet_deploy" That should run fine, although problems could arise if two vehicle's nets are deployed at almost the same time. If you want a totally rock-solid solution, then I'd use the CoC's Network Services, which could be used to solve this problem VERY easily (super easy).
  17. General Barron

    BI Studio Preprocessor

    I think UNN has done work on this sort of thing, though I'm not sure if he came up with a solution or not. One little trick that may (or may not) be helpful is that you can include ofp scripting commands in a config. I think they can only be used in a #define, but I don't know that for sure (and would like the truth on it). In my HS command system, I use the 'camcreate' command to detect if a particular sound addon is installed. If I can camcreate a game logic (defined in the sound addon), then it is installed; otherwise, no error message is displayed. This is all done in scripts of course, but since you can put some script commands in a config, this might lead to something. Basically, the detection function looks like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_detector", "_return"]; _return = false; _detector = "GENB_HS_sounds_english" camcreate [0,0,0]; if(_detector == _detector) then {_return = true; deletevehicle _detector;}; _return It will return 'true' if the addon where "GENB_HS_sounds_english" is configged in is installed, or 'false' otherwise. SO..... I don't know all of the commands that can go in a config, but I don't think there is any type of conditional, other than 'ifdef'. But if there is some way to make 'ifdef' true or false depending on scripting code, then you are set. Maybe you could return an empty string in the function above if it isn't installed? Something like this: #define addon_installed loadfile "blah\addon_check.sqf" #ifdef addon_installed ... Another idea might be to actually return the config from the OFP scripting function. So basically, your function checks if the other addon is installed (as above), and if it is, then it uses "loadfile" to return some config file from that addon. ...or, maybe return a piece of config that has a #define in it, and then use the #ifdef in the first addon's config. So basically, if the second addon is installed, then it will return a string that makes a #define. If the second addon isn't installed, then an empty string will be returned. Either way the string is used in the first addon's config. Hope that made sense, and let me know if it might/could/does work.
  18. General Barron

    scripting question

    There is no scripting command, but there have been a number of scripts that work in ways similar to a "guard" WP. Try searching for these (normally found on OFPEC): Bremmer's Improved AI script v1.1 Keycat's Grouplink II script SKYs AI Addon V1.8 my own Infosharing script (well, it doesn't actually make them move anywhere) any other script/addon with the words "AI" in it.
  19. General Barron

    changing mag count ingame

    Hmm... I had been working on a weapon jamming system with another person a while ago, but ended up never finishing it. Anyway, my first idea was to do basically what you are doing--that is, when a jam occurs, I just remove the magazine and add another one back in. No animations mind you--I didn't want to FORCE the player to stop and clear his weapon; I'd rather he choose when to clear it, represented by him reloading. You could get around the ammo problem by configuring, for example, 29 different mags for an M16--one for each number of rounds in the chamber. Before you remove the mag, you use the 'ammo' command to find out how many bullets he had in his mag. Then you just reequip him with the appropriate magazine. -------------- Now, I don't remember the specifics, but I think this method runs into serious problems when you try to apply it to weapons that can use a variety of different magazines. Take JAM3-compatible weapons for example--they come in two variant mags for each weapon. Again, I don't remember the specifics, but I think it had to do with problems with the 'ammo' command. So anyway, Kammak, who I was working with, ended up using a different approach, which I don't remember exactly. I think he ended up configuring a second weapon, which could not fire. When your weapon jams, it is replaced with this (non-functioning) weapon, which would say something like "M16--JAMMED" in the little ammo count on the HUD. Once you hit an action, everything is switched back (plus anims of course). You would prolly have to reload at this point as well, but since no mags were ever removed, you should have the same ammo count. IIRC, it worked pretty well, but we never got around to making a final version, or getting any addonmakers to actually incorporate the system into their addons (that is, by configuring jammed weapons). I hope that helped.
  20. General Barron

    Internal addon scripts

    The main benefit of a function is that it can return a value. You cannot execute a script and have it return a value to the script that started it. You can do this with a function. In many cases this just makes things more convienient, and scripts 'cleaner'. Technically, in many cases you could get around the use of functions by having a lot of "goto" jumps in your code. But this type of code is (a) difficult to read and understand, (b) would require tons of needless repeating of code across scripts (especially by different authors), and © actually runs slower because of the way OFP handles "goto"s (it searches from the top of the script, line by line, until it finds the label). There is one very useful example of something that can NOT be done without a function. This is the @ command, which waits until a condition is true. Without functions, you can only use what you can fit in parenthesis here. But with a function, you can have some pretty neat conditions. ---------------- But to repeat myself: the best use of functions is to make scripts as understandable as possible. If you keep repeating a set of commands throughout your script, then putting them all into one function might make sense (even if the function is in a LOCAL variable within the script). If you keep repeating a set of commands across a couple different scripts, then it might be a good idea to store those commands as a function in a global variable. The more organized and readable a script is, the easier it is to develop, debug, and improve. Don't sweat the actual 'performance' of a script too much: unless it is doing something hundreds of times a second, all the time, then it really will have no noticable impact on performance. Unless you are writing a very large script system, such as the ECP, CoC's NS, etc, the impact your scripts have on performance will be negligable compared to other things such as island size, object count, model detail, bullets in the air, etc. ---------------- One thing to keep in mind though: there is a limit to how many global variables OFP can handle at one time without corrupting savegame files. That is, if there are too many global variables in use in a SP mission, you will not be able to save and load a game from that mission. This is the infamous "savegame bug". The limit of global vars is actually quite large (hundreds?), so this problem has really only been noticed as a result of a couple large scripting projects running at one time (example, the old ECP combined with a heavily scripted mission). But, since it exists, it is always a good idea to try and limit the number of global variables a given set of scripts uses. Arrays of any size only count as 1 var, so they are a good way to combine many global vars into one.
  21. General Barron

    Is there a way to get Resistance to...

    IIRC, this doesn't work. It's easy enough to check and see though.
  22. General Barron

    OFP co-op "game master" mod - possible?

    Well, if you are going to give someone 'gamemaster' power, you are going to have to trust them with 'godmode' no matter what--they are basically the same thing. Anyway, I've also heard that the X-Cam console can be used for this sort of thing. I've never used it myself, but you should check it out. Link: http://mapfact.net/include....tid=305
  23. General Barron

    OFP co-op "game master" mod - possible?

    IIRC, the command engine only works in SP, and was never updated to be MP compatable. However, on OFPEC there was at least one MP-compatable multiple-squad control system (by Ronald Spiers I think...). Anyway, not much help of course, with OFPEC being down and all.
  24. General Barron

    OFP co-op "game master" mod - possible?

    It could be done, but it would take a lot of scripting. I don't think anything exactly like this has already been made. An alternative would be to use Vektorboson's scripting console. Then you can literally do EVERYTHING on the fly, but of course you will need an unhealthy familiararity with the scripting language. Your best bet for a pre-made solution might be my voting/admin console. Although it wasn't designed to be exactly what you are looking for, you should be able to use it to great effect. BIS forum thread: http://www.flashpoint1985.com/cgi-bin....e+admin Since OFPEC is down, here's a temporary download link: http://rapidshare.de/files/15425205/VA_console.zip.html
  25. General Barron

    The call command and Groups?

    Lemme see if I can explain this without causing more confusion... Your problem is you are confusing a data type with the string representation of that data type. The call command just executes a line of code, the same kind that is typed a script. Using the format command just "types" something into the script dynamically during runtime (instead of ahead of time). The format command will print out the string representation of a data type. But this is NOT the stuff you need to type into a script in order to use this data type. So, during runtime, this line of code here: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call format["selectedUnits = units %1", lbData [1303, lbCurSel 1303]] Tries to execute a line of code that looks exactly like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">selectedUnits = units WEST Alpha Black If you typed that into a script, it would not work, because typing "WEST Alpha Black" doesn't follow proper scripting syntax. Nor will it work if you "type" it into a script via the call + format commands. This confusion arises because for SOME data types, the string representation is the same as what you would type into a script to refer to that data (examples: numbers, strings, sides). But this isn't true for ALL data types (examples: groups, objects)! -------To fix it---------- This might be tough, because of the limited scripting commands available for dialogs. What you are trying to do is to "store" a GROUP into a listbox. But the commands we have for listboxes only store STRINGS. As mentioned before, the string representation of a group can NOT be 'typed' into a script during runtime in order to refer to that group. So you are going to have to be creative to find a workaround. Don't you just love OFP scripting . Here is one possibility: When you fill up this listbox with the string representations of the groups, you also make a (temporary) global variable, which will be filled with the actual groups. The group that goes in the first index of the listbox will also go in the first group of the global array. So it would work kinda like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">createdialog "grouplist" grouplist_groups = [] lbAdd [0, format["%1", group1] grouplist_groups = grouplist_groups + [group1] lbAdd [1, format["%1", group2] grouplist_groups = grouplist_groups + [group2] ...etc etc Obviously you would want to use a loop instead of typing it all out like that. Next, when the player selects a group from the listbox, you read what index he has selected, and you pull the group from the global array (instead of from the listbox, like you are trying to do): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">selectedUnits = units (grouplist_groups select (lbCurSel 1303)) It's an ugly workaround, but it should work. If you are making a big dialog/script, just make sure to comment your code well, and document your global variables somewhere. That way this messy code won't get overwhelming, especially if you return to it after a while.
×