Home   Help Search Login Register  

Author Topic: is "mpgame" a variable  (Read 1632 times)

0 Members and 1 Guest are viewing this topic.

ROBINO

  • Guest
is "mpgame" a variable
« on: 11 Aug 2005, 19:29:58 »
while having a sneaky peek at UKF's new Warrior APC addon - i wanted to see how they managed to get the suspension animations working only in single player

i saw this code

Code: [Select]
? mpgame: exit

my only questions are ... does this code work and successfully detect MP games ?

i have never seen "mpgame" anywhere before - but i AM new at this :)

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:is "mpgame" a variable
« Reply #1 on: 11 Aug 2005, 20:29:07 »

Must be their own variable. If a variable like that one existed, it would be a boolean variable (true or false) and you can easily test it:

Code: [Select]
hint format ["%1",mpgame]
...and that kind of says the variable doesn't exist.

I would say, check the addon's config file.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:is "mpgame" a variable
« Reply #2 on: 11 Aug 2005, 20:58:48 »
Probably a home made variable. The BAS helicopters use a similar variable called basmp (or something like that). If it is set to true, the scripted effects (like cargo, rappel, rope ladders and fire) work better in an MP environment.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:is "mpgame" a variable
« Reply #3 on: 12 Aug 2005, 21:43:35 »
if you are after a system to detect if its an mp game or not, you can query the playersnumber

eg

? (playersNumber WEST + playersNumber EAST + playersNumber RESISTANCE + playersnumber CIVILIAN) >1

its gotta be an mp game unless only 1 player is playing on the server

or using a gamelogic called server

?(local server && local player): hint "this is not a dedicated server"
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:is "mpgame" a variable
« Reply #4 on: 01 Sep 2005, 14:30:59 »
Code: [Select]
? mpgame: exitmy only questions are ... does this code work and successfully detect MP games ?
It's just a (somewhat badly) named variable. Why is it badly named? One could argue that by not using an OFPEC tag (Eg UKF_mpgame in this case) it's easy to confuse people. One victim of that is...you ;D

But now that it's there...how can you put it to use? Well, you could have this in the init.sqs of your mission:
Code: [Select]
mpgame={playersNumber _x}count[east,west,resistance,civilian]>0and the addon would adapt to SP/MP games the way the author of that particular script wanted it to do.

Neat, huh?
« Last Edit: 01 Sep 2005, 14:32:27 by Killswitch »