Jump to content

GBS-III Tutorial - Simple Combat Scenario


Supreme Cmdr
 Share

Recommended Posts

Below is a simple script scenario. Copy and paste the script into IA0901.SCR. Then copy and paste the description into IA0901.DES. Both of these should be blank files in Notepad or your favorite text editor. WARNING: There should be a blank line (i.e. carriage return) on the last line of the DES file or it will not display correctly in MISCON.

Then build the scripts as normal and copy the three resulting (MIS, DES, DAT) files to your MODS folder and run the IA scenario.

Quick explanation of some strange looking scripting directives.

  1. This is a cyclic event. The 0 indicates the date from now. And the 10 is the interval. What this means is that, until destroyed, every 10 mins, that hostile carrier will fire the !engage_player event and launch two fighters to attack the player.

    code:


    !engage_player

    0,10


  2. In this case, the carrier will launch two fighters of random type. They are random because fighter is a derived class. If you wanted a concrete class, you would use a fighter class name e.g. aurora, raven etc. By using the derived class, you introduce a random occurence to the scenario since you have no way of knowing what type of fighter is going to be launched. Also, by using the LAUNCH command, the carrier will launch any type of object, regardless of whether it has it or not. e.g. Megarons don't have Stardrone fighters, but it can launch them using this command.

    code:


    !engage_player

    LAUNCH fighter,2,attack player


  3. This one just awards EPs and a medal if the player was the one that destroyed the target.

    code:


    !destroyed e0,player

    broadcast "COMMAND: PRIMARY TARGET DESTROYED"

    broadcast "+1 STAR OF MERIT MEDAL +5000 EXPERIENCE POINTS"

    ep_add,5000

    add_medal 1,1


  4. Notice also that GALCOMHQ's launch systems are offline and will only come back online when the !backonline event is fired 20 mins into the scenario. Likewise, the hostile Megaron carrier won't appear until the !surprise event is fired 10 mins into the scenario.

IA0901.SCR

code:


#

# INSTANT ACTION SCENARIO

#

[dynamic]

#include glob_dyn.scr

#

[ai]

#include glob_ai.scr

#include glob_ag.scr

#

[dynamic]

galaxian diplomat,,ghq,probe.3d,satcom

[ai]

.ghq,100,100,100,100,100,100,1

start orbit blk05z^flx-11,10000,10,90,0

stop

events

!startup

cloak on this

invincible on this

weapons off this

autogen off

signal surprise,10

signal backonline,20

!init_player

set_race terran

set_caste military

set_career elite_force_pilot

set_craft raven

set_region earthz

set_playername "JOHN ROOKIE"

!destroyed e0,player

broadcast "COMMAND: PRIMARY TARGET DESTROYED"

broadcast "+1 STAR OF MERIT MEDAL +5000 EXPERIENCE POINTS"

ep_add,5000

add_medal 1,1

!destroyed e1,player

broadcast "COMMAND: HOSTILE TARGET DESTROYED"

broadcast "+1 COMBAT SHIELD MEDAL +2500 EXPERIENCE POINTS"

ep_add,2500

add_medal 6,1

!destroyed e2,player

broadcast "COMMAND: HOSTILE TARGET DESTROYED"

broadcast "+1 COMBAT SHIELD MEDAL +2500 EXPERIENCE POINTS"

ep_add,2500

add_medal 6,1

!resolvel1

acm_off quit

endevents

#

[acm]

RACE : TERRAN

CASTE : MILITARY

CAREER : ELITE FORCE PILOT

CRAFT : RAVEN HEAVY FIGHTER

REGION : EARTH SPACE REGION

BASE : GALCOMHQ

.

YOUR PATROL HAS COME UNDER ATTACK BY A GROUP OF FIGHTERS.

YOUR OBJECTIVE IS TO DESTROY THEM AND CLEAR THE REGION

OF ALL HOSTILES.

.

YOU HAVE ONE HOUR TO COMPLETE THIS SCENARIO.

.

:1,earthz,setupl1,beginl1,resolvel1,level1tick,1,60,1

#

[dynamic]

terran military,,f1,raven,WILDMAN

terran military,,f2,raven,CRANK

terran raider,,e0,megaron

terran raider,,e1,stardrone

terran raider,,e2,stardrone

[ai]

.e0,100,100,100,100,100,100,0

start inactive near earthz^jmp-05 15000 earthz^jmp-10

stop

events 1

!surprise

activate this

!startup

patrol earthz

!detect player

signal engage_player

!engage_player

LAUNCH fighter,2,attack player

!level1tick

IF FLAG1 this RETURN

IF EXIST e1 THEN

LAUNCH aurora,2,attack e1

FLAG1 on this

ENDIF

endevents

#

.e1,100,100,100,100,100,100,0

start inactive near galcomhq 5000 earthz^jmp-10

stop

events 1

!beginl1

activate this

!startup

attack player

endevents

#

.e2,100,100,100,100,100,100,0

start inactive escort e1 2000 3

stop

events 1

!beginl1

activate this

endevents

#

.f1,100,100,100,100,100,100,0

start near galcomhq 5000 earthz^jmp-10

stop

events 1

!beginl1

escort player on

!detect player

broadcast "WILDMAN: FORMING ON YOUR WING, COMMANDER"

!under_attack

say "WILDMAN: ENGAGED! ENGAGED","bcv39ghe.wav"

!destroyed e1

say "WILDMAN: HOSTILE TARGET DESTROYED","bcv38dhe.wav"

!destroyed e2

say "WILDMAN: HOSTILE TARGET DESTROYED","bcv38dhe.wav"

!damaged this 65

say "WILDMAN: CRITICAL SYSTEMS FAILURE!!","bcv63ahe.wav"

!damaged this,85

rtb galcomhq

say "WILDMAN: RETURNING TO BASE","bcv46ale.wav"

endevents

#

.f2,100,100,100,100,100,100,0

start near galcomhq 4500 earthz^jmp-02

stop

events 1

!beginl1

escort player on

!detect f1

broadcast "CRANK: I'VE GOT YOU COVERED, WILDMAN"

!under_attack

say "CRANK: INCOMING!!","bcv33ble.wav"

!destroyed e1

say "CRANK: HOSTILE TARGET DESTROYED","bcv38dle.wav"

!destroyed e2

say "CRANK: HOSTILE TARGET DESTROYED","bcv38dle.wav"

!damaged this 65

say "CRANK: CRITICAL SYSTEMS FAILURE!!","bcv63ale.wav"

!damaged this,85

rtb galcomhq

say "CRANK: RETURNING TO BASE","bcv46ale.wav"

endevents

#

.galcomhq

events 1

!beginl1

launches off this

weapons off this

ignore on this

!backonline

launches on this

weapons on this

ignore off this

endevents

#

[event]

!backonline

!surprise

!engage_player

0,10

$


IA0901.DES

code:


EF PILOT [ TACTICAL INTERCEPT - SPACE ]

[description]

RACE : TERRAN

CASTE : MILITARY

CAREER : ELITE FORCE PILOT

CRAFT : RAVEN HEAVY FIGHTER

REGION : EARTH SPACE REGION

BASE : GALCOMHQ

YOUR PATROL HAS COME UNDER ATTACK BY A GROUP OF FIGHTERS. YOUR OBJECTIVE IS TO

DESTROY THEM AND CLEAR THE REGION OF ALL HOSTILES.

YOU HAVE ONE HOUR TO COMPLETE THIS SCENARIO.


Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...