PDA

View Full Version : route in radiant



malyczolg
4th June 2014, 17:41
hello.
how can i define route in radiant for bots ? [waypoints]

kung foo man
4th June 2014, 19:26
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.

malyczolg
4th June 2014, 19:37
thanks , but how can i define who waypoint is closer?

Loveboy
4th June 2014, 20:05
you can check it by distance

malyczolg
5th June 2014, 21:22
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:


dmg = getent("damage","targetname");
self setmodel("xmodel/prop_barrel_black");

dmg.origin=self.origin;
dmg linkto(self);
dmg.owner=self;
dmg thread monitordamage();




monitordamage()
{
self endon("endmonitor");
for(;;)
{
self waittill("damage",dam,attacker,miscattack);
iprintlnbold("1");
if(!isplayer(attacker)) continue;
if(isdefined(miscattack))
{
iprintlnbold("dmg : " + dam);
continue;
}
}
}

kung foo man
5th June 2014, 21:45
http://killtube.org/showthread.php?1832-Question-Astar-%28a*%29-and-SetAlive-functions

malyczolg
6th June 2014, 15:20
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 ...

kung foo man
6th June 2014, 17:16
The hungarian botzom mod spawns like 32 hurt-triggers with some special name in their maps. I don't know the needed names though.

malyczolg
6th June 2014, 17:20
maybe you have another idea to define dmg ?

Ni3ls
9th June 2014, 14:26
http://modsonline.com/Forums-top-143725-0.html#741500