Results 1 to 3 of 3

Thread: [COD2] Waypoints

  1. #1
    ... connecting
    Join Date
    Jul 2019
    Posts
    9
    Thanks
    1
    Thanked 3 Times in 3 Posts

    [COD2] Waypoints

    Hi, I'm finishing up my mod and I had two little questions about the only part of it I don't understand the working mechanism. It's about waypoints.

    1) Are there any limits on waypoint usage? In another example, there can only be 16 objectives on the mini map.
    2) What does the archived property of a waypoint do? The scripting reference only mentions methods, not properties.

    Thank you.

  2. #2
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    245
    Thanks
    64
    Thanked 210 Times in 113 Posts
    If you mean setWaypoint() function for a HUD-element then the limit is 32: https://github.com/voron00/libcod/bl...tions.hpp#L883

    An .archived=true field makes HUD-element to be stored in archived frames and it will be available durning killcam and spectator.
    sudo apt-get rekt

  3. The Following User Says Thank You to voron00 For This Useful Post:

    snoopdoge90 (14th April 2020)

  4. #3
    ... connecting
    Join Date
    Jul 2019
    Posts
    9
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Thank you Voron for your effort to provide an definitive answer. Guess I was too lazy, I spawned up to 20 harcoded waypoints without a problem. Should have done more before asking here . Anyway I did some additional testing.

    So like Voron said, you can spawn up to 32 HUD elements on the screen at the same time. Note that a few of this 32 total are used by the game itself. I don't think menu scripts are a part of this, as you can draw an additional 29 elements on the screen in DM. The game clock definitely takes up 1 of the 32 available HUD elements. Let's say there are a few unrendered elements left, like the respawn text, and consider other gametypes that uses additional HUD elements. A total of 20 free to use HUD elements would be a safe bet. Unlike objectives, the game doesn't crash if you try to draw more than 32 HUD elements on the screen. It rather just show 32 simultaneous elements and queues the excess elements. These excess elements will be shown if one or more of the visible HUD elements gets destroyed. However, you can't rely on this mechanism. It does behave like a queue most of the time, but sometimes a visible element will just disappear for an new excess element to be shown. Also critical game elements (like objectives) will also be queued in some scenarios if you draw too much elements on the screen.

  5. The Following User Says Thank You to snoopdoge90 For This Useful Post:

    kung foo man (20th April 2020)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •