Jump to content

Griffon2-6

Member
  • Content Count

    124
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Griffon2-6

  • Rank
    Sergeant
  1. Ah.... I think I finally figured it out. Your code is actually working. I have to "declare" the _enemies variable first before using it in a conditional statement. What was confusing me was that even though everything said that the original code should be checking for enemies at the destination, the code was in fact checking the origin for enemies. So I guess the stock BIS code doesn't work properly after all...
  2. Thanks for the reply. I gave that a try but still no luck. However, the behavior did change - now when I try to travel to a location where I know there are Resistance troops, my debug lines report that _enemies is equal to 0, but when I try to travel back to my base where there shouldn't be any enemies, it sometimes reports one or two enemies. Is there any reason why what you posted might have worked better than what I had before?
  3. Sorry to bump, but does anybody have any insights on this? Please let me know if there's any other information needed to answer this question.
  4. I've been trying to modify the warfare fast-travel logic. I've spent approximately 12 hours trying to debug this single line of code: if (sideJoined == East) then {_enemies = Resistance CountSide _livingUnits} else {_enemies = 0}; In essence, I want to check for Resistance troops only if the player is on the East side. To debug, I've modified the lines like so: player globalChat Format["sideJoined = %1", Str sideJoined] if (sideJoined == East) then {_enemies = Resistance CountSide _livingUnits; player globalChat Format["sideJoined = %1", Str sideJoined]} else {_enemies = 0}; This would print "SIDEJOINED = EAST" to the screen twice upon a fasttravel check. Upon finishing the check, I have this line: player globalChat Format["_enemies: %1, _unsafe: %2", Str _enemies, Str _unsafe] So that I can check how many enemies have been detected. I've observed the following: Both lines of "SIDEJOINED = EAST" print to screen, so it obviously is doing the check, and the "then" condition is reached. However, the value of _enemies always comes up as a blank when converted into a string, UNLESS I initialize it with the value of 0. In that case, _enemies is always 0 regardless of any further assignments like the one shown in the "then" condition. It seems as if the assignment isn't working, but all I've added to the stock BIS code was the if-then condition, which seems to be working fine. Seeing as how the stock code does work, these two in combination should also work. However, clearly, something's wrong here. Could anybody who's more experienced with scripting shed some light on this? Here's the entire relevant chunk of code for reference: #FastTravelSafetyCheck {DeleteMarkerLocal _x} ForEach _fastTravelMarkers menuButton = -1 ;Check if destination is safe... _unsafe = false _checkRange = TOWNCAPTURERANGE * 2 if (_location != _base) then {_unsafe = [_location,sideJoined] Call HasHostileCamp} else {_checkRange = TOWNCAPTURERANGE * 5}; _objects = NearestObjects[_location,[eastSoldierBaseClass,westSoldierBaseClass,resistanceSoldierBaseClass,"Car","Motorcycle","Tank"],_checkRange] _livingUnits = _objects Call GetLiveUnits _enemies = 0 player globalChat Format["sideJoined = %1", Str sideJoined] if (sideJoined == East) then {_enemies = Resistance CountSide _livingUnits; player globalChat Format["sideJoined = %1", Str sideJoined]} else {_enemies = 0}; if (sideJoined == West) then {_enemies = _enemies + (East CountSide _livingUnits)} else {_enemies = _enemies + (West CountSide _livingUnits)}; if (_enemies < 3 && !_unsafe) then {Goto "FastTravelInProgressMarkers";player globalChat Format["_enemies: %1, _unsafe: %2", Str _enemies, Str _unsafe]}; player globalChat Format["_enemies: %1, _unsafe: %2", Str _enemies, Str _unsafe] _script = [_display DisplayCtrl IDCErrorMessage,1.5,0.75,Localize "STRWFUNSAFEDESTINATION",[1,0,0,1]] Spawn ShowGUIMessage @ (ScriptDone _script) Goto "Update" Thanks for any help in advance.
  5. Griffon2-6

    if/else Statements in SQS Files

    Ah ok, that did the trick. Thanks!
  6. Hi, Does anybody know where the code to initiate a fast travel resides? I've searched for it for days, but all I've managed to find is Common\Functions\FastTravelTo, which is called by the function I'm looking for. I'm trying to modify the check which determines whether the area is safe before fast travelling. Any help would be appreciated.
  7. Hi, I'm working on my own private version of Warfare right now, and I've been trying to modify kill bounties so that East gets four times the bounty. All I've done is add "if" and "else" statements around the original line that sets the value of the bounty, and added the *4 modifier: if (_killerSide == "east") then { _bounty = (unitBounties Select _index) * BOUNTYMODIFIER * 4; } else { _bounty = (unitBounties Select _index) * BOUNTYMODIFIER; }; However, in-game, it always gives me two errors - "Generic error in statement" for the if statement and a syntax error for the else statement. The _killerSide variable looks strange because it's being set to "east" instead of East, but the variable is initialized as a string, so I'm sure this is correct. Is there something I'm doing wrong with the if/else statements or is it something else? Any help would be appreciated.
  8. You guys left out the Chinese flag. How can you represent the Japanese without representing their primary opponent?
  9. Griffon2-6

    Sukhoi Su-33 and Kuznetsov CV

    I'm having a lot of the same problems that HailStorm is reporting: <!--QuoteBegin--HailStorm] it's has very slow acceleration - i'm having trouble catching up to the tail of harriers+unless i have afterburner engaged, which gives me a very small closing speed. [/quote--><table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Quote (HailStorm] it's has very slow acceleration - i'm having trouble catching up to the tail of harriers @ unless i have afterburner engaged, which gives me a very small closing speed. [/quote)</td></tr><tr><td id="QUOTE"> Agreed Same here <!--QuoteBegin--HailStorm]- that tug: no bugs+just praise. seriously, who would have figured something so simple would be so much fun?! [/quote--><table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Quote (HailStorm]- that tug: no bugs @ just praise. seriously, who would have figured something so simple would be so much fun?! [/quote)</td></tr><tr><td id="QUOTE"> AGREED! ABSOLUTELY! LOL! Have to agree here too. Also, @HailStorm, real fighter aircraft cannons do fire in bursts. I know that the F16's cannon (M61A1) fires in 10 Rnd bursts - the SMS page on the MFD shows 51 ammo for cannon (when it is armed) even though the plane has 510 rounds loaded because the cannon is only capable of firing bursts. I think that this is the same for most, if not, all modern fighter planes. However, I don't think that the Gsh-201 fires in 20 Rnd bursts, especially not at that ROF. I am also getting the white cockpit sheet bug. But that just proves that it's so new that the ground crew hasn't even finished unpacking it yet, and left the protective sheet there! All in all though, this is, in my opinion, an amazing addon, despite the bugs, as I realize that it is a first release. I've been waiting for something like this for a long time, and now I have it. All I have to say now is thank you, Gnat.
  10. Griffon2-6

    T-90 MBT

    Ah, ok. Thanks!
  11. Griffon2-6

    T-90 MBT

    Uh, all right. This might be a stupid question, but here goes. How do you use the ATGM on the ATGM versions of the tanks? I have tried switching through all weapons in the commander and gunner position for the T-90A, T-90S (with Marijus' update), T-72 ERA (Badger's, all types of camo), T-72 ERA (The ones located in the Armor category, all types of camo). I can't find the ATGM anywhere.
  12. Griffon2-6

    Mercedes CLS

    The instrument textures are still inversed and the part of the car on the back that says CLS500 is also reversed. Other than that, it's a very good addon.
  13. Griffon2-6

    Possible to leave Camps and Airpor out of Warfare?

    Save the mission with camps present, then delete all the camps in the editor, and save with a different file name. That should do it. Make sure you test the right version.
  14. Griffon2-6

    Su-33 - OPFOR Fighter Bomber

    You should see if you can try to get Franze to let you use his F/A-18 arming script for this plane. This plane is supposed to be the equivalent of the F/A-18E, isn't it? Looks great though. I've been waiting for an Su-27 for a long time, but this will do too I guess hehe. They are the same plane, just one is a carrier variant. Oh, and speaking of which, does this have the tail hook as well?
  15. Griffon2-6

    -=/UPARMORED HMMWV\=-

    Um, this might be a noob question, but here goes. What is the difference in game between the M1151 without front bumper and the M1114?
×