Results 1 to 10 of 10

Thread: route in radiant

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    route in radiant

    hello.
    how can i define route in radiant for bots ? [waypoints]
    Last edited by malyczolg; 4th June 2014 at 18:37.

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You can make many script_origins and connect always 2 of them by selecting and pressing "w" (I think, can't test atm). That generates a "targetname" in the one, and a "target" key in the other. In Radiant the connection is showed with a line. In script you can load this "targetname network" then, by reading the childs of each childs etc.

    But this way is eating up free entity slots very fast. I would rather suggest to save your waypoints in a file/script like MeatBot.
    timescale 0.01

  3. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    thanks , but how can i define who waypoint is closer?

  4. #4
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    you can check it by distance

  5. #5
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    I did it but i have problem with damage_trigger , i can give damage only with grenade.
    but when i give dmg with grenade i have only : iprintlnbold 1 but i havnt iprintlnbold dmg : x .

    radiant :
    targetname
    damage
    script:
    PHP Code:
    dmg getent("damage","targetname");
    self setmodel("xmodel/prop_barrel_black");

    dmg.origin=self.origin;
    dmg linkto(self);
    dmg.owner=self;
    dmg thread monitordamage(); 
    PHP Code:
    monitordamage()
    {
        
    self endon("endmonitor");
        for(;;)
        {
            
    self waittill("damage",dam,attacker,miscattack);
            
    iprintlnbold("1");
            if(!
    isplayer(attacker)) continue;
            if(
    isdefined(miscattack))
            {
                
    iprintlnbold("dmg : " dam);
                continue;
            }        
        }

    Last edited by malyczolg; 5th June 2014 at 21:25.

  6. #6
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    timescale 0.01

  7. #7
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    i dont use libcode. i think probilem is in map when i test script in maps from botzombie hungary i can give damage for bots but on my map i cant ...
    Last edited by malyczolg; 6th June 2014 at 15:45.

  8. #8
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    The hungarian botzom mod spawns like 32 hurt-triggers with some special name in their maps. I don't know the needed names though.
    timescale 0.01

  9. #9
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    maybe you have another idea to define dmg ?

  10. #10
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

  11. The Following User Says Thank You to Ni3ls For This Useful Post:

    kung foo man (9th June 2014)

Posting Permissions

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