Home   Help Search Login Register  

Author Topic: action menu thing  (Read 338 times)

0 Members and 1 Guest are viewing this topic.

jepo

  • Guest
action menu thing
« on: 09 Oct 2004, 06:20:51 »
how can I make it so that when the player gets near a specific object that an option pops up in his action menu and when u click on it it activates a script.

I've searched the forums but I wasnt sure what to search for and I didnt find what I needed so i came here.

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:action menu thing
« Reply #1 on: 09 Oct 2004, 08:32:02 »
Hey jepo-

unitname addaction ["action", "action.sqs"]

So unit name is obvious, thats where you put who you want to have the action added to.

"action" is where you put the writing you want to appear in the players action menu.

"action.sqs" is the script you want to call.

Also, to remove the action from the menu after it's been called use:  unitname removeaction #

# will equal 0 for the first action you add, then if you add another action later on in the mission, you would use 1 in place of the # then 2 for the next and so on.

I hope this makes sense.  You can use it in triggers with a distance call or in scripts.

Blip  :joystick:
« Last Edit: 09 Oct 2004, 08:32:18 by Blip »
...NIGHT WALKER....

jepo

  • Guest
Re:action menu thing
« Reply #2 on: 09 Oct 2004, 10:33:44 »
thanks alot, that should solve my problem  :)