Jump to content

Video Tutorials for the Mission Editor


Webwing

Recommended Posts

No luck.

Delay ( 5000 )

ReinforcementLand ( GROUP , "Group_Truck1" )

Delay ( 10000 )

ReinforcementDestroy ( GROUP , "Group_Truck1" )

Halt

The ReinforcementLand call works properly, but after the 10-second delay the GAZ vehicle I created won't go away. Any chance of getting a quick post of your pertinent code, Oudy? It would be much appreciated....BTW, you use it when you unlimber guns....to get rid of the trucks?

Link to comment
Share on other sites

  • Replies 142
  • Created
  • Last Reply

Top Posters In This Topic

SlapHappy,

Do you have two instances of "GROUP, 1" (in two armies)? If so, i think (haven't had time to test this) that you might have to set which army you are working with first, or make sure that you don't have local @, or global @@ variables conflicting.

Best of luck.

BTW - Said it before - Webwing - your tutorials are ace! Thanks for making them!

Link to comment
Share on other sites

SlapHappy

I posted the unlimber code in my coding examples topic, but it has fallen several pages back...So much for it being useful. :rolleyes:

http://www.battlefront.com/discuss/ultimatebb.php?ubb=get_topic;f=63;t=001242

I've found a number of errors in the manual, so when I need the correct syntax, I always use the code from the included campaigns.

I've about got my test mission finished. I've been reluctant to work too much on it until the patch, so I used it primarily to test code. To debug the mission, I scripted the movement of my own troops as well as that of the AI, so I start the mission and watch both sides advance. It's actually kind of fun to watch...two robot armies attacking one another.

Best wishes

Oudy

Link to comment
Share on other sites

Thanks for the thread refresh, Oudy. You know, I've been thinking about the lack of "Surrender" capabilities in the game and the tendency for games to become fights to the death seems a little much to me.

If a person were to put a scrap of code in to check soldiers PANIC status, you could code a probability that they would surrender. Since there is no "surrender" status, you could have the program change all soldiers who fail the check to become "Neutral" and go prone with hold position. Or if you were really ambitious you could route all enemy POW's back to some "capture point" using a movement script. Potentially lots of possibilities.

Link to comment
Share on other sites

Here's the finished script for the "Exit the map" routine in case anyone wants it:

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> SetWorkArmy ( ARMY , 1 )

ReinforcementLand ( GROUP , "Group_Truck1" ) \\Spawns your sleeping unit at it's map setting. Usually off-map.

RunCommand ( GROUP , "Group_Truck1" , MOVE , POINT , "Map_Exit" ) \\Begin movement toward exit point.

LABEL Begin \\Start a loop.

SET @dist = Distance ( UNIT , 1 , POINT , "Map_Exit" ) \\Define distance to exit point.

if ( @dist < 10 ) Then

Delay ( 5000 )

ReinforcementDestroy ( GROUP , "Group_Truck1" ) //Remove unit from map after five seconds if unit is within 10 meters of exit point.

Else

Delay ( 1000 )

goto Begin //Restart loop.

ENDIF

Halt </pre>

Link to comment
Share on other sites

SlapHappy

Very interesting. I hadn't thought much about surrender. I've been working on morale checks after groups have lost a percentage of men. If they fail the check they will withdraw back to a withdrawal point. I don't like the idea of having to kill everyone on the map to win. That isn't very historical at all.

Here is some very rudimentary code from a trigger called "Stop_Attack" that checks for casualties. It works, but probably needs to be tweaked to get the results you would like.

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">SetWorkArmy ( ARMY , 2 )

//this trigger sets conditions for German withdawl

Label Test1

set @check_G_AC = GetNUnits ( ARMY , 2 , ARMOREDCAR , NOT_EMPTY , OK_WEAPON , OK_ENGINE )

set @check_GHumans = GetNUnits ( ARMY , 2 , HUMAN , NO_PANIC )

set @check_RHumans = GetNUnits ( ARMY , 1 , HUMAN , NO_PANIC )

set @check_RArt = GetNUnits ( ARMY , 1 , ARTILLERY , NOT_EMPTY , OK_WEAPON )

//Initial check

If ( @check_GHumans < 20 "AND" @check_G_AC < 2 "AND" @check_GHumans < @check_RHumans "AND" @check_RArt > 0 ) then

Delay ( 2000 )

Set @random = RND ( )

If ( @random < 25 ) then

RunCommand ( ARMY , 2 , RETREAT , POINT , "G_Reinf_Spawn" )

RunTrigger ( "Mission_Win" )

Halt

else

Delay ( 5000 )

goto Test2

endif

else

goto Test1

endif

//If they pass initial check then check after more casualties

Label Test2

set @check_GHumans = GetNUnits ( ARMY , 2 , HUMAN , NO_PANIC )

set @check_RHumans = GetNUnits ( ARMY , 1 , HUMAN , NO_PANIC )

If ( @check_GHumans < 15 "AND" @check_GHumans < @check_RHumans ) then

Delay ( 2000 )

RunCommand ( ARMY , 2 , RETREAT , POINT , "G_Reinf_Spawn" )

RunTrigger ( "Mission_Win" )

Halt

else

Delay ( 5000 )

goto Test2

endif

Halt</pre>

Link to comment
Share on other sites

Another scripting idea........

Armored Infantry Assault with dismount:

Halftrack units with passengers are given storm command via CreateRectByObject. At preset tracked distance, Passengers are ordered to dismount and storm enemy while halftrack MGer engages enemy with hold command. Haven't seen this one in the supplied missions yet.

Link to comment
Share on other sites

Originally posted by Oudy:

By the way sorry Webwing for hijacking this thread. It would be nice if we had a scripting forum or at least a sticky for scripting.

Again, sorry

Oudy

:D:D:D

We need a forum just for the Editors (Mission and upcoming Map Editor).

Oudy, you know a lot about the editor and your posts here will sure help people out. Your contribution is very important here.

I'm just not sure this thread is the best place to talk about advanced scripting. The idea here is for more basic stuff for people that are not familiar with scripting.

This kind of scripting issues are very interesting but might scare a lot of people when the idea is exactly the opposite.

-

Link to comment
Share on other sites

hi

i made a raw mission to test for myself in the last 2 houers based on the tutorials.

basicly the player defends as german some vilage somewhere. its more fictional and a test mission.

however, right now i managed the problem that the tanks would arive much to early and inf creeping somewhere behind. all the enemy force start far away i put the infantry a bit nearer to the germans so the tanks have to catch up. does the trick for now.

however, since the "point" where the force should go to is a "defend" point the enemy rushes stubborn to this point and just returns fire when a track is broken. infantry doesnt shoot also.

so would this change when i alter the defend to an attack command!? so the enemy attacks this point and so all units on the way!?

and would "attack" be the right therm to use inthe script!?

EDIT:

oh and how to give the text message when reinforcements arive!? i know the verry basics allready oyu need "light" introduction smile.gif

[ June 01, 2007, 09:59 PM: Message edited by: Pandur ]

Link to comment
Share on other sites

Originally posted by Pandur:

oh and how to give the text message when reinforcements arive!? i know the verry basics allready oyu need "light" introduction smile.gif

Go to the campaigneditor....add your mission to campaign / singelmissions and save.

Now you can open the stringtable from your mission and add your messages,

i.e. SID=1 "Reinforcement have arrived", dont forget to save in the campaigneditor!

Go back to the missioneditor and add the send message command in your reinforcement trigger.

Should looks like that:

ReinforcementLand( Group , "Group_sherman_1" )

ReinforcementLand ( GROUP , "Group_sherman_2" )

ReinforcementLand ( GROUP , "Group_sherman_3" )

ReinforcementLand ( GROUP , "Group_sherman_4" )

SendMessage ( "1" , 10000 )

Delay ( 15000 )

ClearMessage ( "1" )

Halt

ENDIF

Link to comment
Share on other sites

i see, i give it a try.

should be doable

EDIT:

oh,ähh...and currently i have a little problem with detatchment reinforcements.

in my test map there is one P4 as reinforcement. and theoreticaly also a detatchment.

well the tank shows up the detatchment not.

at first i just took the code sniped and dublicated it in the same reinf trigger. just changed the groupname to fit the name of the detachment group.

that didnt worked.

than i did a 2nd reinf trigger as the first one, just other name of group. didnt worked also.

do i need placeholders for reinf too!?

i tested with the P4. put it somewhere, declared it as reinf and fired up the mission. i think it allways spawned where i put it and i havent set an placeholder there for this tank.

it shows up, detachment not :D

why could that be!?

a editing sub direction for that game would be nice. so i wouldnt have to litter this tread with it.

[ June 03, 2007, 06:53 AM: Message edited by: Pandur ]

Link to comment
Share on other sites

ok fixed the detachment. i did a placeholder for it becouse i wasnt sure if i need it. thoght it would work with it when it can work without one. thats not the case.

i also managed to get the masssage showing up. righ now i try to get the sens why i need 2 submission thingys in the win trigger and if i need a fail trigger when i have a win trigger!?

i looked through the tutorial but its a bit puzzeling.

anyways when i manage to get an functioning win trigger somehow i think about uploading this mission. its absolutely nothing special but well some people meight like it still. is has no fancy support stuff or so.

considering the amount of mission available rightnow i think some guys may also be allready happy they can play a mission they dont know :D

Link to comment
Share on other sites

Pandur

The thing to keep in mind about enemy AI units that are reinforcements or otherwise, is that enemy units will do nothing but stand and move around just a bit in the area they are originally generated....They will fire or otherwise engage units in their LOS, but that's about it. Any mission specific movement requirements have to be scripted in some fashion.

In fact, they will not even pursue your forces when spotted as friendly AI tends to do when not given a "hold" order. I found this out when generating a script to create a Russian "human wave" command.

Link to comment
Share on other sites

oh, iknow that at least :D

i changed the "video tutorial" "move" code to a simple "storm" instad of "move" becouse it was like shooting ducks in move command.

currently this guys are just storming these point defined and when there(if) putting into defend and hold.

the attacker has basicly 5 or 6 sqads, 4 t34 and 2 KV1 and 2 tanketes.

defender start with 3 sqads(1 ATR and 2 Faust ones) and 3 PzIII and a Stug.

reinforcements come after an fixed amount of time(short befor russian wave comes close) and are a PzIV and another Faust squad.

now when i would generate reinforcements for the enemy(as an 3rd army), i think i should be ablo to do more or less another move trigger with the same code but just for a group wich is part of reinforcements...! is this right!?

Link to comment
Share on other sites

It sounds like you have it, Pandur. Wherever you put the Trigger command it will call the next set of reinforcements. Just remember to change the SetWorkArmy to army 3 and change the group names.

Oudy

Link to comment
Share on other sites

Pandur

Based on my HT Assault mission script writing I can tell you that infantry defending in trenches have a definite advantage vs. onrushing infantry (as it should be). Even when the entrenched are of lower quality, it will take some fairly good numerical superiority on behalf of the attacker to see any kind of success. Happily, multi-directional attacks do seem to give some advantage when storming entrenched positions (as it should be). Also, some vehicular support is always a plus as well.

Link to comment
Share on other sites

I can tell you that infantry defending in trenches have a definite advantage vs. onrushing infantry (as it should be).
indeed :D

but i took rather limited spot for this.

inf will pop in sight about 500-400m or so. than you can have a shot at them. however not much closer and they are in a depression in fron of the trenches. mean they can close in to 75-50m befor comming in sight of the trenches again.

that protects em in the most dagerous range from 300 down to 50 meters.

right now when i play test it i can shrugh off the Infantry advance totaly, only when i succesfully counter the enemy armor(wich "should close in more or less at the same time as the infantry, but thats not so easy to get :D ). than i can blast away on the soldiers with coaxial and bow´s.

well, if that doesnt work its also not so bad becouse its a test mission :D

when the guys reach first trench line, sometime a granade battle developes. this can quickly leave the trench empty.

last try i added the Stug and i didnt saw this version had 80mm front armor. now its rather invincible from the spot where i use it. i could ditch PzIV(is a /L43 one)now. or give stug as reinf.

have to see.

Link to comment
Share on other sites

--

I have uploaded a new video tutorial.

It's not so much about the Mission Editor per se.

This is about how to make the briefing map graphics using a program like Photoshop or DeepPaint(free).

Feedback appreciated.

--

Link to comment
Share on other sites


×
×
  • Create New...