Results 1 to 5 of 5

Thread: Bomb in Zone Script

  1. #1
    Combat pilot Veteran66's Avatar
    Join Date
    Jan 2013
    Posts
    114
    Post Thanks / Like
    Total Downloaded
    206.20 MB

    Bomb in Zone Script

    Hi all

    i look for a script:

    Bomb in Zone

    so a Bomb explodes in a trigger zone.

    is this possible?
    My System:
    Windows 11
    RAM 64,0 GB
    Intel i7 3.80GHz
    NIVIDIA GeForce RTX 3070

  2. #2
    Supporting Member
    Join Date
    Dec 2019
    Posts
    474
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Bomb in Zone Script

    Maybe this below is useable somehow. You could compare the pos of the bomb explosion to your target pos then do an if regarding wether the bomb explosion it is within a distance of x frm your target?

    Code:
       OnBombExplosion(
          string title,
          double mass,
          Point3d pos,
          AiDamageInitiator initiator,
          int eventArgInt)
        {
        }
    It's what I would try. First off test if you can get the pos for a bomb explosion, if you can then the rest is definitely/probably possible.
    Last edited by Yo-Yo; Jun-01-2023 at 15:42.
    I am Yo-Yo not YoYo (that's someone else)

  3. Likes GANIX liked this post
  4. #3
    Supporting Member
    Join Date
    Dec 2019
    Posts
    474
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Bomb in Zone Script

    Code:
        public override void OnBombExplosion(string title,double mass,Point3d pos,AiDamageInitiator initiator,int eventArgInt)
        {
            Console.WriteLine(pos.x.ToString() + " and " + pos.y.ToString())
        }
    Does return bomb explosion coords. (Have only put them to string for viewing in the message, they are doubles)

    bomb pos.jpg
    Attached Images Attached Images
    Last edited by Yo-Yo; Jun-01-2023 at 16:06.
    I am Yo-Yo not YoYo (that's someone else)

  5. Likes Veteran66 liked this post
  6. #4
    Supporting Member
    Join Date
    Dec 2019
    Posts
    474
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Bomb in Zone Script

    Then in this thread I asked about measuring distances

    https://theairtacticalassaultgroup.c...l=1#post388864

    So you should be able to measure between the x and y from your bomb impacts, and the x and y of your target and do something with the result.

    Probably you want to hold the first measurement, then overwrite it if any are lower, but not if higher?
    Last edited by Yo-Yo; Jun-01-2023 at 16:05.
    I am Yo-Yo not YoYo (that's someone else)

  7. #5
    Combat pilot Veteran66's Avatar
    Join Date
    Jan 2013
    Posts
    114
    Post Thanks / Like
    Total Downloaded
    206.20 MB

    Re: Bomb in Zone Script

    Quote Originally Posted by Yo-Yo View Post
    Code:
        public override void OnBombExplosion(string title,double mass,Point3d pos,AiDamageInitiator initiator,int eventArgInt)
        {
            Console.WriteLine(pos.x.ToString() + " and " + pos.y.ToString())
        }
    Does return bomb explosion coords. (Have only put them to string for viewing in the message, they are doubles)

    bomb pos.jpg
    this is a good idea, it needs an object in the middle of the target and a maximum distance to the bombs to shoot a message (Voice)
    My System:
    Windows 11
    RAM 64,0 GB
    Intel i7 3.80GHz
    NIVIDIA GeForce RTX 3070

Bookmarks

Posting Permissions

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