hello.
how can i define route in radiant for bots ? [waypoints]
hello.
how can i define route in radiant for bots ? [waypoints]
Last edited by malyczolg; 4th June 2014 at 18:37.
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
thanks , but how can i define who waypoint is closer?
you can check it by distance
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 :
script:targetname
damage
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.
timescale 0.01
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.
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
maybe you have another idea to define dmg ?
kung foo man (9th June 2014)