Announcement

Collapse
No announcement yet.

Respawn Ticket Help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Respawn Ticket Help

    Hello People of TG,

    I am currently making a cooperative mission where a small unit attempts to secure an area and rescue a bunch of hostages. The mission only has a limited number of tickets. I am using the editors ticket module. The problem is that when the tickets reach zero the mission ends with a "Your Side Has Won." I want the mission to end in a failure when the player tickets reach zero. Do I need to define the tickets in the description.ext and have a trigger in game?
    e.g.
    Code:
    //description.ext
    respawnTemplates[] = {"Tickets","EndMission"};
    ticketsWest = 12;
    //trigger condition
    WestTickets <= 0
    I am unsure how to implement a ticket system in missions, any help is appreciated!

    Thanks,
    CapShawns

  • #2
    Re: Respawn Ticket Help

    My last successful implementation on this front was in the mission called Red Hawk v2. Download and extract that mission to see exact details. Now if I remember the following are the main components:

    Code:
    //initServer.sqf
    [west, 5] call BIS_fnc_respawnTickets; // this add 5 tickets to the side west
    I am not sure how the eden has changed but make sure the ticket is subtracted upon respawn either in attributes in eden or in description.ext as you have done.

    A trigger in the editor with condition that says:
    Code:
    [west] call BIS_fnc_respawnTickets < 1 // Now this is < 1 or 2 because I wanna catch it before the game system catches it at 0 and does its thing.
    Activation
    Code:
    endMission "END1" // this one I don't remember. This one you can define how the mission is ended. Extract and look at the mission for exact code in the trigger
    For fanciness I think I had something in the onPlayerRespawn.sqf file to broadcast how many tickets are left everytme a player respawns. Take a look at that as well.

    Comment


    • #3
      Re: Respawn Ticket Help

      Thanks for the help! The ticket system worked like a charm!
      Last edited by CaptainShawn123; 08-11-2016, 02:04 AM. Reason: I figured out my second question

      Comment

      Connect

      Collapse

      TeamSpeak 3 Server

      Collapse

      Advertisement

      Collapse

      Twitter Feed

      Collapse

      Working...
      X