Flat!!! 0 Posted June 7, 2007 My question is basically what to type into trigger if you have the following in the description.ext: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = "Time limit:"; valuesParam1[] = {10000, 300, 600, 900, 1200, 1500, 1800, 2700, 3600, "7200"}; defValueParam1 = 1800; textsParam1[] = {"Unlimited", "5 minutes", "10 minutes", "15 minutes", "20 minutes", "25 minutes", "30 minutes", "45 minutes", "1 hour", "2 hours"}; titleParam2 = "Score limit:"; valuesParam2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30}; defValueParam2 = 5; textsParam2[] = {"1 point", "2 points", "3 points", "4 points", "5 points", "6 points", "7 points", "8 points", "9 points", "10 points", "15 points", "20 points", "25 points", "30 points" }; In the init I have typed: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!local server:goto "skip" WScore=0 publicvariable "WScore" EScore=0 publicvariable "EScore" ownerW=objnull publicvariable "ownerW" ownerE=objnull publicvariable "ownerE" WFlagTaken=false publicvariable "WFlagTaken" EFlagTaken=false publicvariable "EFlagTaken" TimeEnd=0 publicvariable "TimeEnd" What should I type into a trigger? And Why? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 7, 2007 Well, there are a ton of different ways to do it and it depends on how your existing scoring and time limit system works. But basically, you would use the global variables Param1 and Param2 to return the value from valuesParam# that corrosponds with the option selected from textsParam# when the mission is started. So, for example, if you chose "5 minutes" and "4 points", Param1 would equal 300 and Param2 would equal 4. So then you just need to reference these variables in a script or series of triggers that controls the time limit and score limit (by whatever means you decide to use). Share this post Link to post Share on other sites
Flat!!! 0 Posted June 7, 2007 How many parameters can one use maximally? Share this post Link to post Share on other sites
mr.peanut 1 Posted June 8, 2007 People who need more than two params sometimes use a param to list combinations of options. Clunky but it works. e.g.Skill level/Day_Night Low/Day Low/Night High/Day High/Night etc. Share this post Link to post Share on other sites