OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Robinhansen 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
-
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"]
-
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... ;)
-
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. :'(
-
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 (http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=22005;start=15;boardseen=1)