Jump to content
3000AD Forums
Sign in to follow this  
Spuzzum

'Nother Question

Recommended Posts

Any chance that we could have a prompt command that filtered a Y/N keypress as a true or false boolean into a flag?

I.e.

prompt -"message"-,-object-,-flag-

code:

# yadda yadda yadda

!detect cc

broadcast "Hi, sir."

prompt "Permission to rendezvous with the GCV-Starskimmer?",cc,FLAG1

# yadda yadda yadda

# and so on...

!ia01tick

IF FLAG2 cc THEN

IF FLAG1 cc THEN

broadcast "Yes sir, heading to Sirius."

# ...

ELSE

broadcast "Understood, sir. Standing by."

# ...

ENDIF

ENDIF

# and so on...


I left out the [] sections for brevity.

I know, I know, I can tell you're trying to get this thing finished... but better to suggest it then to forget it permanently!

Share this post


Link to post
Share on other sites

I think what Spuzzum after is being able to branch the script with the player choosing which option to take.

Like the old Job board in Elite the player can choose what tasks to perform.

You could do it with the code we have now I think but it's a bit ugly.

Create your messenger with his broadcast of the options

Create two cargo_pods one called yes one called no

Use the !destroyed victim,[attacker]command for the flag to activate the option

If the player destroys the yes pod then the down payment items can be created on the messenger craft for collection.

A timer can be set with a default action of "no" and all NCP removed from the game.

You could also set a timer to activate damage system command if the player fails to complete the mission in time.

The idea above may need a bit more work but in principle I do think it's possible to branch the TOD's from the players actions within the script.

You will already be using the players actions to determine the outcome of missions so its only a small step to take.

[ 07-07-2001: Message edited by: Pugwash ]

Share this post


Link to post
Share on other sites

nah, too much work

besides, if someone gives you a job and you don't want to take it, just don't do it. The script will run anyway.

What I do plan on putting in, post-BCM release of course, is conditional script branching. So, you could have an event that calls another script or a part of the same script, and bypass an entire block of processing. This way, more complex multi-branching scripts can be created.

Share this post


Link to post
Share on other sites

quote:

...This way, more complex multi-branching scripts can be created.

Cool

Wheels are a spinning

TTFN

Share this post


Link to post
Share on other sites

quote:

Originally posted by Supreme Cmdr:

nah, too much work

Oh well. At least I tried.

quote:

besides, if someone gives you a job and you don't want to take it, just don't do it. The script will run anyway.

Yup, but then they could lose experience if they don't do it... right? Or am I misunderstanding something... which is possible.

quote:

What I do plan on putting in, post-BCM release of course, is conditional script branching. So, you could have an event that calls another script or a part of the same script, and bypass an entire block of processing. This way, more complex multi-branching scripts can be created.

That sounds very good. Very, very good.

I have a lot of IF-ELSE things set up right now, for the possible combinations of destroying three ships in a particular order.

(The reason is, more or less, to simulate Raiders' morale. If you take out their leader, the other ships go beserk and attack. If you destroy one of the ships, and then the leader, the other ship will bug out with broken morale. Or you can destroy both ships, and then the leader, and finish 'em all off. The leader, naturally, is too proud (good ol' deadly sin) to flee, but the other ships don't have that advantage/disadvantage. But this was just a rant that isn't even important. )

Share this post


Link to post
Share on other sites

Actually, I could set up a flag on the CC whether or not they took the mission (i.e. rendezvoused with the objective), which would determine if they got paid/experienced or not.

Consider that former statement revoked.

Share this post


Link to post
Share on other sites

quote:


Actually, I could set up a flag on the CC whether or not they took the mission (i.e. rendezvoused with the objective), which would determine if they got paid/experienced or not

Yes, just use the !reach event in something like

code:


!reach target_id

IF flag1 on this RETURN

flag1 on this

broadcast "OK, he reached the target"


Similarly in this one, he will ask about his money every 5 mins, starting from the time the event is first fired. This technique is called a cyclic event.

code:


events

!I_came_I_SAW_I_PUKED_I_LEFT

broadcast "Bastard, where's my money?"

!reach target_id

IF flag1 on this RETURN

flag1 on this

signal I_came_I_SAW_I_PUKED_I_LEFT,1

broadcast "OK, I'm here"

endevents

[event]

!I_came_I_SAW_I_PUKED_I_LEFT

0,5


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×