Home   Help Search Login Register  

Author Topic: buttonSetAction and buttonAction  (Read 519 times)

0 Members and 1 Guest are viewing this topic.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
buttonSetAction and buttonAction
« on: 09 Jan 2005, 20:26:32 »
Lately I've simply been using the addaction command for certain actions I wish too be used.
However, recently I discovered the buttonSetAction and buttonAction commands and thought that this would be a much more efficent way of doing things.

Sadly, however, I have been unable too use this command for I cannot find its proper usage. What I wish for this too do is Buttonaction == ["Enter","script.sqs"] however this obviosly does not work.

Any help would be greatly appreciated, and please dont just say "Stick with addaction, much better"
I like your approach, lets see your departure.
Download the New Flashlight Script!

bored_onion

  • Guest
Re:buttonSetAction and buttonAction
« Reply #1 on: 09 Jan 2005, 20:42:51 »
i think those commands are for use with dialogs rather than ordinary in game stuff.

AK-Chester

  • Guest
Re:buttonSetAction and buttonAction
« Reply #2 on: 09 Jan 2005, 20:45:43 »
From the Official ComRef:
Quote
buttonAction idc
Operand types:
    idc: Number
Compatibility:
    Version 1.5 required.
Type of returned value:
    String
Description:
    Return action assigned to control with id idc of topmost user dialog. Action is any expression in this scripting language. Can be used for buttons and active texts.

Example:
    _action = buttonAction 100

---

buttonSetAction [idc, action]
Operand types:
    [idc, action]: Array
Compatibility:
    Version 1.5 required.
Type of returned value:
    Nothing
Description:
    Assign action to control with id idc of topmost user dialog. Action is any expression in this scripting language. Can be used for buttons and active texts.

Example:
    buttonSetAction [100, "player exec ""reply.sqs"""]
Means that these commands are for use in/with dialogs only, they're not related to user actions at all.  :(

[edit]...just like bored_onion - the fast one - said.[/edit]
« Last Edit: 09 Jan 2005, 20:47:09 by AK-Chester »

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:buttonSetAction and buttonAction
« Reply #3 on: 09 Jan 2005, 21:45:49 »
Aw, man thats lame.  >:(

Well, I guess thats why I couldnt figure it out.
« Last Edit: 09 Jan 2005, 21:46:20 by RujiK »
I like your approach, lets see your departure.
Download the New Flashlight Script!