Home   Help Search Login Register  

Author Topic: adding stuff in the action menu  (Read 828 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
adding stuff in the action menu
« on: 10 Feb 2003, 13:52:31 »
Hi! How do you add text in the action menu and make something happen if the player choose that option? Plz help.

Thx in advance.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:adding stuff in the action menu
« Reply #1 on: 10 Feb 2003, 13:55:33 »
actionname = unitname addaction ["actionname","scriptyouwanttotrigger"]

Not all is lost.

Josef

  • Guest
Re:adding stuff in the action menu
« Reply #2 on: 10 Feb 2003, 13:56:23 »
this addAction ["TEXT","sciptthatwillbeused.sqs"]

make a script that set a variable to true..

Then yer have a action operated trigger... ;D WOAH

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re:adding stuff in the action menu
« Reply #3 on: 10 Feb 2003, 14:47:57 »
Hi,

Let's say that you have a soldier called 's1' with waypoints and you dont want him to move before you give him the order, you can do it like that:

s1 lockWP true
player addAction ["Resume WP", "resumeWP.sqs"]

and in the 'resumeWP.sqs'

; --------resumeWP.sqs ----------

s1 lockWP false

; and if you want to remove the action from the menu
; OFP pass a reference of the action ID as param 3
player removeAction (_this select 2)

exit

; ---------end script--------------

that's it
Hope it helps
AliMag

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:adding stuff in the action menu
« Reply #4 on: 10 Feb 2003, 16:20:42 »
Thx guys.

TOPIC SOLVED AND LOCKED