Home   Help Search Login Register  

Author Topic: addaction?  (Read 455 times)

0 Members and 1 Guest are viewing this topic.

Robinhansen

  • Guest
addaction?
« on: 13 Feb 2005, 20:56:26 »
this string: [eng, "cover4"] exec "pos.sqs" works perfectly in a trigger, but how do I add it to a playeres actionmenu? :D

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:addaction?
« Reply #1 on: 13 Feb 2005, 21:03:32 »
well, i dont know what your string stands for but with addAction but maybe this will help  :-\:

actionname = unitname addAction ["Action Menu Title","Script To Execute.sqs"]
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Robinhansen

  • Guest
Re:addaction?
« Reply #2 on: 14 Feb 2005, 00:02:20 »
ENG is the name of the player. COVER4 is the classname of Sparks fightposistion.
The script is supposed to create a fightposistion in front of the player, but in a multiplayergame the player cannot use radiocommands so it got to be in the actionmenu.
I'm sad to say it but the way it is described does'nt work. Tried it ealier... ;)

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:addaction?
« Reply #3 on: 14 Feb 2005, 22:23:54 »
ah, i see what you're sayin :P im a loon

okay, its not really possible to assign varibles like that through a sodding addAction command, but there are ways to cheat ;D

you have to make a global varible (or two) that the script accesses, which you assign before the player uses the addAction command. Or even just assign the varibles in the script like _myLoon = player. But you cannot pass varibles through the addAction command, unfortunatly. :P

Sorry mate. :'(

"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Robinhansen

  • Guest
Re:addaction?
« Reply #4 on: 15 Feb 2005, 01:00:49 »
Tanks for the tip m8, but I'm way ahead of ya' ;)

I got this reply ealier today...check it out:

http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=22005;start=15;boardseen=1