Jump to content
Sign in to follow this  
vektorboson

Download console for ofp:r

Recommended Posts

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Sep. 20 2002,22:36)</td></tr><tr><td id="QUOTE">There must be a way of doing it, cause Kegetys made a Spectator script that only activates for one person. Probably really simple, but i don't make MP missions...

tounge.gif PEACE<span id='postcolor'>

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">There must be a way of doing it, cause Kegetys made a Spectator script that only activates for one person. Probably really simple, but i don't make MP missions...

tounge.gif PEACE<span id='postcolor'>

Where can i download this script confused.gif

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">I think you could make something like

? player != leader player: exit

<span id='postcolor'>

Where must i make this confused.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (FAR-Warrior @ Sep. 21 2002,11:59)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Sep. 20 2002,22:36)</td></tr><tr><td id="QUOTE">There must be a way of doing it, cause Kegetys made a Spectator script that only activates for one person. Probably really simple, but i don't make MP missions...<span id='postcolor'>

Where can i download this script confused.gif<span id='postcolor'>

Check this thread.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">I think you could make something like

? player != leader player: exit

<span id='postcolor'>

Where must i make this confused.gif<span id='postcolor'>

First line of the script that initiates the console.

Share this post


Link to post
Share on other sites

Annoyingly, i cant make a group of people die. I need this for an afghanistni cuscene where everyone dies due to chemical weapons. ive tried:

{on activation} eastteam setDammage 1

{condition} not (alive n)

It doresnt work! Help! confused.gifmad.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (copl @ Sep. 24 2002,19:00)</td></tr><tr><td id="QUOTE">Annoyingly, i cant make a group of people die. I need this for an afghanistni cuscene where everyone dies due to chemical weapons. ive tried:

             

            {on activation} eastteam setDammage 1

            {condition}       not (alive n)

It doresnt work! Help!  confused.gif  mad.gif<span id='postcolor'>

In which way does your problem touch the console?

Share this post


Link to post
Share on other sites

Hey Poppa  tounge.gif

I think maybe you should make some Everon, Malden, Kolgugev and Nogova templates for people so it's easier for them to use this in testing their missions. (They can just merge them in)

Ill help you with it if you want, just give us an electric bell (E-mail smile.gif ).

 wow.gif PEACE

Share this post


Link to post
Share on other sites

OK, I'll send you the cleaned up version of the console, and then, to cite Jean-Luc Picard: "Make it so!"

Share this post


Link to post
Share on other sites

Where is the information on how to define dialogs like this? Is there a tutorial or some more info on it somewhere? If there is, it'd be a lot faster than me sifting thru this and the one Maruk made in order to figure it out.

BTW great work!

Share this post


Link to post
Share on other sites

Nice tutorial, bigpoppa, here's a couple of questions regarding some of the info:

I see from studying the BIS sample mission that you can create the listboxes and then using a script and the lbadd, etc. commands you can create a listbox from scratch and only define the basic shell of it. Is this possible at all with buttons? I'm creating a button menu with pictures, but from what I can tell I'm unable to place pictures on buttons with text. Also, there seems to be no command to create buttons from scratch so in description.ext I'm manually defining each button with a CT_STATIC as the picture next to it. I'm assuming i can place a picture on a CT_BUTTON but then I couldn't put text on it..correct?

Also, In the MP mission I am attaching actions to buildings and players will come to building, select the action from their action menu, and the dialog will appear. I wish to use that building as the position to SetPos anything they click on in the menu, i.e. they click on the "Take Jeep" button. Then the button does this:

"[Player] exec ""TakeJeep.sqs""; closeDialog 0"

The problem is, in multiplayer, Player can be any of the non-AI players. With an AddAction script, you have the unit the action was attached to, the unit that exec'd the action, and the actionid. Does any such thing exist with the Dialogs?

I know that since the Actions with addaction exec on a local client, then the dialog will only be open on the client, but I need to pass the information about which building the action was associated with and the actual unit that exec'd the action.

Does anyone have any ideas?

Thanks!

Share this post


Link to post
Share on other sites

As far as i recall, you cannot add pictures to buttons. I may be wrong, but i don't know.

I stand corrected tounge.gif

wow.gif PEACE

Share this post


Link to post
Share on other sites

I just figured a way around it and place the picture under the text of the button, so it looks like the button has text and a picture.

If I could create columns and rows of buttons via a script like you can with a listbox, then that'd be great.

The other issue is how to send specific variables to the Dialog that can be passed along to whatever script the buttons execute, and I haven't figured that out yet. It would be pretty vital to any multiplayer mission that uses dialogs I would think.

Share this post


Link to post
Share on other sites

I can't tell you about the multiplayer thing, but concerning clickable pictures:

You have to add the button after the picture controls in your controls-array:

i.e.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

controls[] = { MY_PICTURE, MY_BUTTON}

<span id='postcolor'>

everything is drawn from left to right, so OFP draws first the picture and then the button. If it would be the other way, you could not click the button.

And the text of the button appears if you have defined any (because the picture is drawn first).

But there is no way to assign a ST_PICTURE-style to CT_ACTIVETEXT or CT_BUTTON.

EDIT:

I see you were faster smile.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">If I could create columns and rows of buttons via a script like you can with a listbox, then that'd be great.<span id='postcolor'>

What do you mean by this? Do you mean multiple buttons in a column? confused.gif

More info...

Share this post


Link to post
Share on other sites

He wants to create the buttons dynamically and not predefine them in the description.ext.

I think the easiest way is to create a listbox where every entry is another action (assign a script with lbSetData).

Share this post


Link to post
Share on other sites

Correct. I kind of like the looks of the buttons over the Listbox though. I guess it depends on the application though.

Share this post


Link to post
Share on other sites

Here's something else that doesn't seem to be working. I'm trying to define the buttons so that the text appears either at the top of the button or in the top left corner, but regardless of which style I use, I can't seem to get anything except left align, right align or center to show up.

Here's the definitions in my description.ext:

// Static styles

#define ST_HPOS 0x0F

#define ST_LEFT 0

#define ST_RIGHT 1

#define ST_CENTER 2

#define ST_UP 3

#define ST_DOWN 4

#define ST_VCENTER 5

I tried them all, but all the text does is simply go to the left side of the button.

Neither ST_UP nor ST_DOWN seem to work, and I've tried them all. Is there something special I need to do?

Here's my button class--I just left ST_CENTER in there for now. I'd like to be able to specify more exactly where I want the text to go.

class RscButton

{

type = CT_BUTTON;

idc = 1;

style = ST_CENTER;

colorText[] = {0.8, 0.1, 0.1, 1};

font = FontHTML;

sizeEx = 0.025;

soundPush[] = {, 0.2, 1};

soundClick[] = {"ui\ui_ok", 0.2, 1};

soundEscape[] = {"ui\ui_cc", 0.2, 1};

default = false;

};

Share this post


Link to post
Share on other sites

Well, im going to go out on a limb here and say that they don't work. But im sure our good friend Bigpoppa will disagree tounge.gif

Either that, or they're used by other controls. Personally, i only use ST_LEFT and ST_CENTER. Although i HPOS sounds familiar....

tounge.gif PEACE

Share this post


Link to post
Share on other sites

This time I have to agree with Gameer_77 tounge.gif

There a lot of limitations to styles and controls and I can't tell you all! I'll sometimes have to find out myself. confused.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×