[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Entity List?

Entity List?

Discuss Artificial Intelligence and Bot programming.

Moderator: InsideQC Admins

Entity List?

Postby blubswillrule » Tue Jan 25, 2011 6:30 am

A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby silverjoel » Tue Jan 25, 2011 7:16 am

Have you tried something like .float MARKCHECK? That would make every true false value local to the entity.

Here's a little bit of code I made to do a tracker entity. I was sick of seeing a monster not go through a doorway and instead running along the wall on the oppisite side.

void() monster_chase =
{

if(enemy_vis)
{
self.tracker = self.enemy.origin;
self.goalentity = self.enemy;
self.trackcheck = 1;
remove(self.track);
}
else
{
if (self.trackcheck == 1)
{
self.track = spawn();
self.track.origin = self.tracker;
self.track.owner = self;
self.track.solid = SOLID_NOT;
self.track.movetype = MOVETYPE_NONE;
setmodel (self.track, "");
setsize(self.track, '0 0 0', '0 0 0');

self.goalentity = self.track;

self.trackcheck = 0;
}
}

if (vlen(self.track.origin - self.origin) < 50)
{
remove(self.track);
self.goalentity = self.enemy;
}
};

It created a entity at the last place it saw the enemy and went to that origin instead of the enemy origin. It worked alright.

Maybe this can help.
silverjoel
 
Posts: 52
Joined: Thu Sep 30, 2010 6:46 am

Postby blubswillrule » Tue Jan 25, 2011 7:25 am

hmm, nice code, i'll have to read that in-depth to extract it's juicyness :P

anyways,as for the .floats, well, I used .floats

but I believe (AND PLEASE CORRECT ME IF I'M WRONG)
that
self.way.MARK ============== self.mark
^^from zombies perspective______^^from waypoints perspective,

and since the waypoints must be global, then it won't nescessarily work :\ ... that is, if i'm right.

the example code that you showed me, (although as awesome as it is), isn't quite what i'm trying to achieve, you see, I need the zombie to be able to go to the player, regardless of whether it has seen the player or not, no matter where the player is on the map.
A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby silverjoel » Tue Jan 25, 2011 7:27 am

It actually might be something you could use. You could spawn a temporary entity at the origin of the waypoint and use it as the place to go. When you reach it, just remove it and spawn the next one.

The enemy_vis stuff can be taken out.
silverjoel
 
Posts: 52
Joined: Thu Sep 30, 2010 6:46 am

Postby blubswillrule » Tue Jan 25, 2011 7:57 am

A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby silverjoel » Tue Jan 25, 2011 3:11 pm

silverjoel
 
Posts: 52
Joined: Thu Sep 30, 2010 6:46 am

Postby blubswillrule » Tue Jan 25, 2011 3:26 pm

A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby blubswillrule » Tue Jan 25, 2011 11:58 pm

repost, didn't find anything on there

anybody have any ideas on how to have a list of entities in quake?
without regards to AI, just in general.

like, one entity owns a list
you can add entities to that list
you can clear the list
you can check if an entity is on the list.

any ideas on how to make this? I REALLY need help, please :(
A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby frag.machine » Wed Jan 26, 2011 1:13 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby blubswillrule » Wed Jan 26, 2011 3:49 am

A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby blubswillrule » Mon May 02, 2011 8:47 pm

A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California

Postby frag.machine » Tue May 03, 2011 12:48 am

As long the different lists have different parents, I don't see any problems.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby Spike » Tue May 03, 2011 4:11 am

if you modify the objects to create the list, you can only add that object to one list.

you can have multiple things refering to the same list, you can have additional lists which lead on to the aforementioned list, but if you have a single 'next' pointer, you only have a single next pointer.

so a list of simple node objects that purely refer to the real object and the next node will work. will take a lot of memory, one per ent, but it'll work.

If you're okay with maximum list sizes, you may wish to consider using some sort of field array in a qcc that supports it.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby blubswillrule » Wed May 04, 2011 6:13 am

A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
User avatar
blubswillrule
 
Posts: 68
Joined: Mon Oct 04, 2010 9:08 pm
Location: Lincoln, California


Return to Artificial Intelligence

Who is online

Users browsing this forum: No registered users and 1 guest