SlapHappy Posted July 1, 2007 Posted July 1, 2007 Originally posted by wokelly: </font><blockquote>quote:</font><hr />Originally posted by SlapHappy: </font><blockquote>quote:</font><hr />Originally posted by wokelly: Okay managed to get the enemy to hold fire so I can start trying to get the open fire triggers in place. The new problem is the fact the LOS issue goes both ways and my soldiers can see the enemy so they shoot at them. Now I have an enemy that wont fire and my super soldiers that can see through walls and trees. *sigh* From above: Wokelly Keep in mind this does not keep your units from firing on those same scripted enemy units if they have LOS to the enemy and are not under "Hold Fire" command when using the Firemode option. However the ChangeArmy option should work mutually, because your troops will not fire on neutral entities. </font>
SlapHappy Posted July 1, 2007 Posted July 1, 2007 Ok. It's done. And works! Very rush, sloppy job on the mission itself. I just created three Rusky tanks and four Jerry Pak 35/36. The player is the Russians. The German Paks start out Army 2 which are set to neutral. Once the Russian tanks enter a certain rect boundary zone the Paks switch from Army 2 to Army 3 which is pre-set to enemy status for Army 1 (You). Now both sides can initiate normal fire against each other because they are now hostile. While you cannot fire on the paks while they are neutral, you CAN SEE THEM once you enter normal LOS areas on the map. However, you can AREA FIRE against them, so you can damage soft targets with tank fire like infantry or AT guns. So in a sense, the player could cheat and fire against the spotted neutral guns while they are in their neutral status using area fire only. I could see this being a real problem. Wokelly - Do you want the code for the triggers in this thread or do you want the whole test mission for overview? I could email you the mission if you wish.
wokelly Posted July 1, 2007 Author Posted July 1, 2007 Yeah the Rectange boxed are a problem. I think I will end up having to make many boxes to fill in the areas, which should be fun. Will have to copy the script several times and change the box it belongs to. Thanks for the help by the way. When I found the LOS issues were still present I realized I may have shot myself in the foot with the promises I made for this campaing. If this scripting thing works, I think things will work out nicely. First map is basically done except for scripting. If you get me a script soon I could have the first battle released for evaluation in a few days.
wokelly Posted July 1, 2007 Author Posted July 1, 2007 Acutally if I could get both that would be neat. I would like to see the script in action myself as well as have the script. mcpl__kelly@hotmail.com or kell9710@wlu.ca One other question. As soon as they leave the box do they go back to neutral. I ask this because if you probe the enemy position, you will likely come into battle with the enemy, so if you leave the box would it go back to neutral to simulate the fact your guys have withdrawn and are once again hidden from view? As for seeing eachother, I think players using my campaign will simply have to turn off the icons above each unit to make things realistic. Its a bit of a lousy restriction I'll admit but I dont see how we can do things any better [ July 01, 2007, 12:18 PM: Message edited by: wokelly ]
SlapHappy Posted July 1, 2007 Posted July 1, 2007 OK. Check your email wokelly. BTW, the tanks I created are completely facing the wrong way because I neglected to use placeholders to speed up the creation process. It's sloppy, but shows the idea works. You might be able to clean it up a little, if you wish.
wokelly Posted July 1, 2007 Author Posted July 1, 2007 Okay found nothing in both my e-mail boxes, not even junk e-mail. I dunno to be safe could you just post the code on the forum. [ July 01, 2007, 12:35 PM: Message edited by: wokelly ]
SlapHappy Posted July 1, 2007 Posted July 1, 2007 Originally posted by wokelly: Acutally if I could get both that would be neat. I would like to see the script in action myself as well as have the script. mcpl__kelly@hotmail.com or kell9710@wlu.ca One other question. As soon as they leave the box do they go back to neutral. I ask this because if you probe the enemy position, you will likely come into battle with the enemy, so if you leave the box would it go back to neutral to simulate the fact your guys have withdrawn and are once again hidden from view? As for seeing eachother, I think players using my campaign will simply have to turn off the icons above each unit to make things realistic. Its a bit of a lousy restriction I'll admit but I dont see how we can do things any better I think it depends on how the code is written.. If I'm correct, the way I wrote it, they will stay hostile even if you leave the triggering box. But I could be wrong, test it and see. you will probably want to open it in the editor to understand fully what is going on with the mission.
SlapHappy Posted July 1, 2007 Posted July 1, 2007 WOKelly If you use the suggestion I sent with the attachment (the CreateByRect idea) I think you will get more satisfying results because the player will have NO IDEA where the enemy units are until they appear when triggered. If he flanks correctly he will be behind or on the flank of the enemy when they appear. If he guesses wrong....well...he's in for a nasty surprise. Granted, this is a little gamey, because it's possible he would have had LOS to the area where the enemy units would appear before triggering them. It will be sort of like playing the solo rules for Squad Leader with it's enemy generation tables, if you are familiar with that concept.
SlapHappy Posted July 1, 2007 Posted July 1, 2007 OK here's the code: </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> [init] RunTrigger ( "Switch Army" ) Halt [switch Army] Label 1 SetWorkArmy ( Army , 1 ) Set @num_GE_Force = GetNUnitsInArea ( Army , 1 , ALL , "Rect_1" , OK_WEAPON ) if ( @num_GE_Force > 0 ) Then SetWorkArmy ( Army , 2 ) ChangeArmy ( Army , 2 , 3 ) Halt endif Goto 1 </pre>
wokelly Posted July 1, 2007 Author Posted July 1, 2007 Yeah nothing there. Did you copy and paste my e-mail or type it? My mcpl__kelly@hotmail.com one has TWO underscores not one. its mcpl _ _ kelly but with no spaces.
wokelly Posted July 1, 2007 Author Posted July 1, 2007 Okay this is not working. Here give me your e-mail and I will send you messages from both mine, then try replying to those. Otherwise I cant figure out what the hell is going on.
SlapHappy Posted July 1, 2007 Posted July 1, 2007 Both the send attempts are in my Sent Items folder. Could be a case of sever latency...but with both email addresses?
SlapHappy Posted July 1, 2007 Posted July 1, 2007 Just got your email trying again on the .ca email address
SlapHappy Posted July 1, 2007 Posted July 1, 2007 Well, you should have it twice now, then. I just re-sent to the .ca email address.
SlapHappy Posted July 1, 2007 Posted July 1, 2007 You should have an attachment that is less than 2kB in size.
wokelly Posted July 1, 2007 Author Posted July 1, 2007 This is a freaking nightmare. No luck on the e-mail with the attachment. Cant help but wonder if my e-mails do not like the attachment and are not letting it in.
SlapHappy Posted July 1, 2007 Posted July 1, 2007 I just tried the hotmail account again with the attachment.
SlapHappy Posted July 1, 2007 Posted July 1, 2007 The two files are zipped, so they should be an allowable attachment type.
wokelly Posted July 1, 2007 Author Posted July 1, 2007 Im sorry I hate to be making you all this. Are you replying to my original e-mail? If not try replying and adding the attachment to that just in case.
Recommended Posts