OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Seven on 21 Sep 2006, 19:06:06
-
Hi,
I managed to make my first respawn dialog where the player gets to choose a predifined loadout.
But I get an error when triying to pass this:
class BUTTON1 : RscButton
{
x = 0.25;
idc=-1
y = 0.42;
w = 0.2;
h = 0.04;
text = "MG SOLDIER";
action = "[player, "MG"] exec ""rearm.sqs"""
default = false
};
which would do:
_unit = _this Select 0
_type = _this Select 1
_unit addEventHandler ["killed",{_this exec "playerkilled.sqs"}]
RemoveAllWeapons _unit
?(_type == "MG"): Goto "MG"
?(_type == "grenadier"): Goto "grenadier"
?(_type == "AT"): Goto "RPG"
And so on...
Can anybody give me some advice on this or help me out?
All help apreciated.
Greetz
-
action = "[player, "MG"] exec ""rearm.sqs"""
You got did right with ""rearm.sqs""", but not with "MG".
Remember - " inside " rule. ;)
~S~ CD
-
Cool thx I'll try this tonight! :)
-
Great this works fine!
Thx Chris :)
Got one more question (thought might be better than making a new post for it so will do it here quickly):
How do I get flares I add to the units loadout to be in the part where the flaregun is and not where the rest of the magazines are?
Cheers! :afro: