Jump to content

Starting work on a Custom Campaign


wokelly

Recommended Posts

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>

Link to comment
Share on other sites

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites


×
×
  • Create New...