MP-Map - trigger & Script help

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design

Post Reply
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

MP-Map - trigger & Script help

Post by Owi »

Hello all,

i like to create some or my first Multiplayermap but need some help to get some knowledge for winningconditions, triggers, scripts.

For my first map i need following winning conditions:

If a GoldHEX is hold by a unit for 3 turns the side wins the game.
If a side has no more units the other side wins.

Is someone willing gimme a hand?

Thanks Owi
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: MP-Map - trigger & Script help

Post by terminator »

Let us begin with the easiest : "no more units the other side wins":

Step 1: Scenario Params >Victory conditions
Step 2: Outcome
Step 3: Edit
Editor(1).jpg
Editor(1).jpg (65.33 KiB) Viewed 3895 times

Step 1: Add map condition
Step 2,3,4,5
Trigger(3).jpg
Trigger(3).jpg (110.63 KiB) Viewed 3895 times
If you understood we can pass in the following question which is I think the most complicated which exists (I suppose that the hexagon must be occupied during three turns which follow one another).
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

Thanks for your help
Screen-2017-03-16_15-53-17.jpg
Screen-2017-03-16_15-53-17.jpg (50.2 KiB) Viewed 3893 times
Looks like this now. ok?
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: MP-Map - trigger & Script help

Post by terminator »

It seems good (to you to make a test with Slect Side = hotseat).
I propose you this condition to begin easier : "If the flag of GoldHEX is axis for 3 turns the side wins the game"

Goto Scripts and make this:
Trigger(4).JPG
Trigger(4).JPG (39.23 KiB) Viewed 3887 times
Tags are used as counter. The order is very important.
Example:
The first turn axis capture the flag.
At the beginning of the second turn,Tag '1' is added. Tag '2' and Tag '3' don't exist.
At the beginning of the third turn, if the flag is axis and Tag '1' exist , Tag '2' is added.
At the beginning of the fourth turn, if the flag is axis and Tag '2' exist , Tag '3' is added.

If a condition is true, the game will read this condition only once (Run count : 1 by default).

Goto "Victory conditions" and make "Trigger = Tag '3' exists"
Trigger(5).JPG
Trigger(5).JPG (47.4 KiB) Viewed 3887 times
If you understood, the next step is to test "occupy an hexagon"
Last edited by terminator on Thu Mar 16, 2017 3:53 pm, edited 1 time in total.
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

Got it and understood.
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: MP-Map - trigger & Script help

Post by terminator »

If you want to know if an hexagon is occupied , you have to use "Zones" instead of "Flags":

Step 1:
Trigger(6).JPG
Trigger(6).JPG (82.45 KiB) Viewed 3883 times
Step 2:
You will have this :
Trigger(7).JPG
Trigger(7).JPG (79.22 KiB) Viewed 3883 times
If you move your unit of the Zone1 in this example, the turn will not be counted.

If you understood, the next step is to test if the hexagon is occupied during three turns which follow one another.
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

check, got it.

it means i can do the victorycondition of 3 turns by either - flag check or zone unit occupie check. basicly
The script runs the lines from top to bottom.
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

I definitly want a unit within that HEX for Victory condition. So the Flag check aint requied because you can do this by axis or allied unit check.
Do i have to delete tags that have been set allready or does the script reruns every turn? (if you thing that question is to fast and we get there anyway - scratch it and keep going with your lessons)
Run - 1 means exactly the script runs 1 time a turn or 1 time at all?
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: MP-Map - trigger & Script help

Post by terminator »

Last step :
You have to remove the Tags if there is no unit of Zone1.
Run Count = number of turn of your game (10 in this example) for all the triggers except the trigger for Tag'3' (victory)
(remember If a condition is true, the game will read this condition only once (Run count : 1 by default))
Trigger(8).JPG
Trigger(8).JPG (66.55 KiB) Viewed 3879 times
(Display message is to know which Tag is activated or removed because it begins to complicate!)

If you have other questions , do not hesitate
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

Thanks alot.

If i set "-1" to script run will that be infinite run?

I have a general question on unit deployment. I want no unit been deployed on turn 1. Every player has 10 slots to buy units for. If i add the markers for deployment / grey and green ( what is the different between grey and green?) but run the map i cant deploy or either buy units. Slot / aux xount is set.

Needs that to be scripted aswell?
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: MP-Map - trigger & Script help

Post by terminator »

Grey and green must be the side, it is only for campaign. To buy units, you must be sure core slots > core units and have town to deploy.
Here is the scenario you can see in this topic :
Trigger.zip
(1018 Bytes) Downloaded 117 times
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

If you want to add a script line between allready existing one .. can you drag/move lines or do i have to rewrite the script?
McGuba
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Thu Mar 15, 2012 7:34 pm

Re: MP-Map - trigger & Script help

Post by McGuba »

As far as I know you cannot drag scripts. :(
ImageImage
slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: MP-Map - trigger & Script help

Post by terminator »

The editor for the games is often an impractical beta version
captainjack
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1908
Joined: Thu Sep 13, 2012 7:42 am

Re: MP-Map - trigger & Script help

Post by captainjack »

It seems the editor can do almost anything which is good, but it's often very difficult to find out how and then it can be very difficult to apply.

Thanks to Terminator for explaining how to make this work. I'd been wondering how to do something like this for a while to set victory conditions and to trigger awards of special units. It would also work well for in-game secondary missions such as raids behind the lines.
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

Yes, definitly thanks to termi . will have some more questions soon.

Heres the map i create for this scriptpurpose. XD Need to test it bit more but i think its pretty funny multiplayermap.
Mirrored even map with 1 capture point to hold for 3 turns.
pc_mp.jpg
pc_mp.jpg (183.85 KiB) Viewed 3771 times
Owi
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 77
Joined: Thu Feb 25, 2010 3:06 pm
Contact:

Re: MP-Map - trigger & Script help

Post by Owi »

How do i add more Deploymentzones to the map. Currently im stuck creating more tiles for units. If i make a city i only can deploy 1 tiles near the city but i want 8-10 deploymentzons for each side?
Post Reply

Return to “Panzer Corps : Scenario Design”