Jump to content

koalasalad

Member
  • Content Count

    67
  • Joined

  • Last visited

  • Medals

Posts posted by koalasalad


  1. I do not really know how to explain what I'm trying to do but I will do my best. I created a working money system but my problem is that the money is shared between everyone. How would I make it so each player (there will only be 2 players) has their own money?

    In this example money = 0

    if (money < 100) then
    {
       player1 groupChat format ["You cannot afford this item. You only have $%1", (money)];
    } else {
       money = money - 100;
       player1 addWeapon "M9";
       player1 groupChat format ["You bought a M9 and have $%1 remaining", (money)];
    };

    The problem with this is that when the money is subtracted, it is subtracted from everyone. I need player1 and player2 to have their own money.

    Would I have to do something like:

    player1money = 0;
    player2money = 0;

    It would be nice if i could just do:

    if (player1 money < 100) then...

    Thanks for the help,

    Koalasalad


  2. you would need to put a trigger down with: (or write a script)

    condition of trigger:

    taskCompleted task1

    OnAct: (for example)

    tsk2 = player createSimpleTask ["Patrol a Town"];

    tsk2 setSimpleTaskDescription ["There are reports of armed men inside the town", "Patrol", "Patrol"];

    tsk2 setSimpleTaskDestination (getMarkerPos "mkrobj2");

    tsk2 setTaskState "CREATED";

    Once task1 is complete, the next task would be created.


  3. I am making a basic script which activates once the vehicle "bus1" gets within 10 meters.

    So i have this but it doesn't work:

    if (bus1 distance trap1 < 10) then {bus1 setHit ["wheel_2_1_steering", 1]; bus1 setHit ["wheel_2_2_steering", 1]; bus1 setHit ["wheel_1_1_steering", 1]; bus1 setHit ["wheel_1_2_steering", 1]};

    If I switch it to > instead of < then it works but i don't want it to activate if the distance is greater then 10. I want it to activate if the distance is less then 10.

×