Author Topic: [Answered] waypoints: weapon is firing in random directions  (Read 2656 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
(OXCE Version: Extended-6.5.5-fd29708fb-2020-06-21-bionic-x86_64)

I've got a weird one this time, I really like this but I'm not sure why it is behaving the way it is so I can't control it reliably.

The weapon is setup to fire 5 shots everytime it is fired and can be configured to have up to 3 waypoints when firing. (Like a Blaster Bomb Launcher.)

So here are the anomalies that this weapon is displaying:
. Once the bullet reaches the first waypoint it starts firing in very random directions.
. Although it is configured for "confAimed: shots: 5" the weapon fires 12 times.

It's fun in a chaotic kind of way, but it can also randomly kill your own soldiers if the bullet decides to suddenly turn around.

Could someone please explain why this is happening and how it works?

Here is the code:
Code: [Select]
items:
# Example Weapon
  - type: STR_EXAMPLE_WEAPON
    size: 0.2
    costSell: 92000
    weight: 6
    bigSprite: 30
    floorSprite: 29
    handSprite: 40
    bulletSprite: 8
    fireSound: 18
    compatibleAmmo:
      - STR_EXAMPLE_WEAPON_AMMO
    accuracyAimed: 45
    tuAimed: 35
    battleType: 1
    invWidth: 2
    invHeight: 3
    recoveryPoints: 3
    armor: 50
    attraction: 10
    waypoints: 3
    twoHanded: true
    bulletSpeed: 2
    explosionSpeed: 2
    confAimed:
      shots: 5
      name: STR_MA_AIMED_SHOT
      ammoSlot: 0
      arcing: false
    listOrder: 902400
    categories:
      - STR_MA_CAT_ALL_PLASMA_WEAPONS
# Example Weapon Ammo
  - type: STR_EXAMPLE_WEAPON_AMMO
    size: 0.1
    costSell: 2400
    weight: 1
    bigSprite: 25
    floorSprite: 33
    hitSound: 19
    hitAnimation: 46
    power: 65
    damageType: 5
    clipSize: 40
    waypoints: 3
    battleType: 2
    recoveryPoints: 1
    attraction: 1
    attraction: 10
    listOrder: 902525

I've attached a Mod to this post with the above code for convenience.
« Last Edit: February 12, 2023, 10:23:00 am by Meridian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: (OXCE) waypoints: weapon is firing in random directions
« Reply #1 on: June 27, 2020, 12:42:06 pm »
To give a visual example, in the attached screenshot instead of the bullets banking left towards waypoint 2 it went right turning AWAY from waypoint 2.

During this set of auto shots there were also some additional shots that did fire towards waypoint 2 position when they arrived at waypoint 1.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: (OXCE) waypoints: weapon is firing in random directions
« Reply #2 on: February 12, 2023, 10:22:38 am »
Waypoint-based weapons (e.g. blaster launcher) don't support autoshots.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [Answered] waypoints: weapon is firing in random directions
« Reply #3 on: February 12, 2023, 10:42:48 am »
3 years later and my experience is that it is fun if a bit chaotic, so please leave it in as an unintended feature.