Jump to content

GBS-III Tutorial - Using [SETS]


Supreme Cmdr
 Share

Recommended Posts

*moved*

quote:


Originally posted by Cc:

Thanks for the demo.

But I am having a problem with Scripting Blocks [sETS]

Specifically I am trying to generate multiple cargo pods using sets per the example in gbsIII_docs.txt page 30.However I am not having any luck.I can not get extra cargo pods to appear other than the initial scripted cargo pod.I am using the exact script fragment as on page 30 in an IA scenario.If you need the full script I will post it.

Also I am somewhat confused about how to use the 'create' event action.The syntax is CREATE NUM,[set_member...]

How about an example?

Thanks.


Please don't post in threads that do not pertain to the subject or it will be deleted.

quote:


I can not get extra cargo pods to appear other than the initial scripted cargo pod.I am using the exact script fragment as on page 30 in an IA scenario.


What has this got to do with sets? The creation of sets and the creation of elements that use them, are two entirely different things. If you have an event that creates a single cargo pod that contains a 'set' of items, that event will only create that single pod (as in my example on p30). If you want several pods to be created or if want the same pod to be created a number of times, you have to use a cyclic event or several normal events.

quote:


Also I am somewhat confused about how to use the 'create' event action.The syntax is CREATE NUM,[set_member...]

How about an example?


Whats confusing about it? The syntax and an example are already right there on p30.

Anyway, post the script and I'll take a look.

[ 11-02-2004, 03:09 PM: Message edited by: Supreme Cmdr ]

Link to comment
Share on other sites

I posted here because I was blocked from opening a new post under GBSIII.

quote:

What has this got to do with sets? The creation of sets and the creation of elements that use them, are two entirely different things. If you have an event that creates a single cargo pod that contains a 'set' of items, that event will only create that single pod (as in my example on p30). If you want several pods to be created or if want the same pod to be created a number of times, you have to use a cyclic event or several normal events.

Going to have to study that.

[ 11-02-2004, 01:32 PM: Message edited by: Supreme Cmdr ]

Link to comment
Share on other sites

quote:


Originally posted by Cc:

I posted here because I was blocked from opening a new post under GBSIII.


Thats odd; it looks fine to me; but I'll check it.

Anyway, I can't read your script; it hurts my eyes. You need to reformat and post it using the UBB 'code' tags.

Link to comment
Share on other sites

quote:

Anyway, I can't read your script; it hurts my eyes. You need to reformat and post it using the UBB 'code' tags.

Sorry about that.

code:

#

# SYSTEM SCRIPT - 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

!init_player

set_race terran

set_caste military

set_career commander

set_craft starcruiser

set_region earthz

!resolvel1

acm_off quit

endevents

#

[acm]

RACE : TERRAN

CASTE : MILITARY

CAREER : COMMANDER

CRAFT : STARCRUISER HEAVY CRUISER

REGION : EARTH SPACE REGION

BASE : GALCOMHQ

.

Sets Coding Block Example

.

:101,earthz,setupl1,beginl1,resolvel1,level1tick,1,30,1

#

[dynamic]

#

mixed trader,,cargo_pod,cargo2,cp1

#

[AI]

.cargo_pod,100,100,100,100,100,100,0

start inactive near earthz^jmp-10 2000 jmp-04

stop

events 101

!createit

create 1,cargo_pod2,cargo_pod3

!beginl1

activate this

signal createit,2

endevents

#

[sets]

:cargo_pod2

cargopod

:cargo_pod3

cargo2.3d

[event]

!createit

$

[scenario]

COMMANDER [ SETS TEST]

[description]

RACE : TERRAN

CASTE : MILITARY

CAREER : COMMANDER

CRAFT : STARCRUISER HEAVY CRUISER

REGION : EARTH SPACE REGION

BASE : GALCOMMHQ

SETS TEST PROGRAM.

TRYING TO GENERATE CARGOPODS USING SETS.

YOU HAVE THIRTY MINUTES TO COMPLETE THIS SCENARIO.

Edit: If I put in 'broadcast' statements as a troubleshooting aid it never gets past the 'create 1,cargo_pod2,cargo_pod3' event action.

Link to comment
Share on other sites

I still have no idea what exactly it is you are trying to accomplish. If you're just trying to create a cargo pod with items, that script is completely wrong. And nowherje do you list the items (obtained from DATAITEMS.INI) you want the pod to contain when created.

Do you have any experience with modding, scripting, programming etc or are you just winging this? If you are, I don't have time to teach you - or anyone - how to use logic flow. The GBS tools are for those who have a glimmer of an idea what they're doing; thats why modding is not something that everyone that owns a game, does.

That said, this script segment will create a pod with items in it. It also contains several other cargo related examples. I have not attempted to parse it; so if it has errors, you're on your own.

code:


[dynamic]

#

mixed trader,,cargo_pod1,cargo2,goodies1

mixed trader,,friendly_trader1,canlon,Jimmy_Hoffa

mixed trader,,friendly_trader2,lrt10,Abe_Lincoln

#

[ai]

.cargo_pod1,100,100,100,100,100,100,0

start inactive near earthz^jmp-10 2000 jmp-04

stop

events 101

!beginl1

activate this

!startup

# add 1000 units of Iridium and 500 units of Radine to pod

add_store this 1000,058,500,071

!detect player

broadcast "CARGO POD: I HAVE BEEN CREATED WITH A BUNCH OF STUFF!!"

endevents

#

.friendly_trader1,100,100,100,100,100,100,0

face nat.bmp

start near earthz^jmp-10 50000 jmp-04

stop

events 101

!beginl1

halt on this

!startup

# add a bunch of stuff defined in the [set]

add_store this cargo_stuff1

!detect player

broadcast "JIMMY HOFFA: I'VE GOT A TON OF STUFF. CHECK OUT MY MANIFEST"

!level1tick

IF FLAG1 this RETURN

IF HERE PLAYER 5000 THEN

# only execute this block (once) if the player is 5km or less from me

broadcast "JIMMY HOFFA: TRANSFERING MY CARGO TO THE POD"

move_all_store friendly_trader1,cargo_pod1

FLAG1 on this

ENDIF

!create_stuff

halt off this

broadcast "JIMMY HOFFA: JUMPING TO CHECK OUT WHAT ABE LINCOLN HAS"

jump friendly_trader2

!reach friendly_trader2

halt on this

broadcast "JIMMY HOFFA: OK, LETS SEE WHAT YOU GOT. I WANT THE HSD ARTIFACT"

IF friendly_trader2 CONTAINS 418 THEN

broadcast "JIMMY HOFFA: OH COOL, YOU'VE GOT THE HSD. I'LL TAKE IT"

move_store friendly_trader1,friendly_trader2,1,418

signal leave_now,1

ENDIF

!leave_now

broadcast "JIMMY HOFFA: GOING TO STARPATH TO SELL THIS STUFF"

halt off this

dock starpath

endevents

#

.friendly_trader2,100,100,100,100,100,100,0

face mark.bmp

start near earthz^jmp-03 50000 earth

stop

events 101

!beginl1

halt on this

!startup

signal create_stuff

!create_stuff

add_store this 1,418,1,419,1,420

broadcast "ABE LINCOLN: I'VE GOT SOME STUFF. WHAT DO YOU NEED?"

!leave_now

broadcast "ABE LINCOLN: GOING TO GALCOMHQ TO BUY MORE STUFF"

halt off this

dock galcomhq

endevents

#

.galcomhq

events 101

!leave_now

broadcast "GALCOMHQ: YEAH, WE NEED SOME MORE ITEMS. CLEAR TO DOCK"

endevents

#

[sets]

:cargo_stuff1

5000,067,10,278,1,143,1,142

:cargo_stuff2

100,145,1,138,1,136

[event]

!create_stuff

!leave_now

$


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...