Global Variable (Full Version)

All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command WWII: World at War >> MODS and Scenarios



Message


Robert24 -> Global Variable (1/18/2021 10:10:59 PM)

Good afternoon,

Or logic is used with the below [:D]

Can someone point to a previous Forum answer for using Global Variables in scripts?
Is there an explanation with some detail?
Is there an example in the campaign game scripts?

Thanks in advance!

-Robert




BillRunacre -> RE: Global Variable (1/19/2021 7:12:33 PM)

Hi Robert

The rescue of Mussolini uses these, as if GV 6 is between 1 and 90 he will be rescued, but if it is 91-100 then he won't be.

Another relates to the attempt to capture Dakar.

I've pasted the POP UP scripts relating to Mussolini here so you can use their example as inspiration for whatever you're cooking up! [:)]



; Operation Oak:
; Historical date of event was 1943/09/12
; Images - Wikipedia Commons (Public Domain)
{
#NAME= DE 621 - Otto Skorzeny Rescues Mussolini
#POPUP= <<TAG_23>>
#MESSAGE=
#IMAGE= skorzeny_raidsuccess1.png, skorzeny_raidsuccess2.png, skorzeny_raidsuccess3.png
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 4
#LEVEL= 0
#GV= 6[1,90]
#LINK= 621[1]
#COUNTRY_ID= 45
#TRIGGER= 100
#PRIVATE= 0
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 1
#DISPLAY_STYLE= 0
#MESSAGE_STYLE= 0
#DATE= 1941/01/01
#TEXT_RGB= 255,255,255
#SHADOW_RGB= 0,0,0
#MAP_POSITION= 94,50
;Set Alignment Position (Berlin)
#ALIGNMENT_POSITION= 101,36 [1]
#VARIABLE_CONDITION= 45 [1] [100] [0]
; Dummy condition position (always satisfied)
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

; Operation Oak:
; Historical date of event was 1943/09/12
; Images - Wikipedia Commons (Public Domain)
{
#NAME= DE 621 - Otto Skorzeny's Mission To Rescue Mussolini Failed
#POPUP= <<TAG_24>>
#MESSAGE=
#IMAGE= skorzeny_raidfailure.png
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 4
#LEVEL= 0
#GV= 6[91,100]
#LINK= 621[1]
#COUNTRY_ID= 45
#TRIGGER= 100
#PRIVATE= 0
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 1
#DISPLAY_STYLE= 0
#MESSAGE_STYLE= 0
#DATE= 1941/01/01
#TEXT_RGB= 255,255,255
#SHADOW_RGB= 0,0,0
#MAP_POSITION= 94,50
;Set Alignment Position (Berlin)
#ALIGNMENT_POSITION= 101,36 [1]
#VARIABLE_CONDITION= 45 [1] [100] [0]
; Dummy condition position (always satisfied)
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}




Robert24 -> RE: Global Variable (1/20/2021 2:44:13 AM)

Great stuff Bill! [:)]

I had never asked and just worked around GVs.

Would a GV function with a third script? For example…

#NAME= DE 150 III Corps Arrives In Egypt
#GV= 5[1,33]

#NAME= DE 150 III Corps Arrives In UK
#GV= 5[34-66]

#NAME= DE 150 III Corps Arrives In India
#GV= 5[67-100]

-Robert




BillRunacre -> RE: Global Variable (1/20/2021 10:08:40 AM)

Yes, there are some like that in our WWI game. There could be more than 3 if needed. Potentially 100 in theory but I've never thought to use that many... not yet anyway! [:D]




Robert24 -> RE: Global Variable (1/20/2021 2:04:45 PM)

Well, this is good news Bill - Thank you!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.828125