1 registered members (AndrewAMD),
718
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: OKAY OKAY FINE!!! FREE AI!!
[Re: Hellcrypt]
#60026
12/09/05 13:07
12/09/05 13:07
|
Joined: Jul 2004
Posts: 1,205 Greece
LarryLaffer
Serious User
|
Serious User
Joined: Jul 2004
Posts: 1,205
Greece
|
Quote:
But I am guessing what you did was place like a var. Example enemys are 1 and good guys are 2. Then scan if it's one or two. Am I close?
Quote:
well kinda but go ahead and try that and you'll run into a big problem.. I accually had to make all entities scan, and then it detects what my.id skill is. But ya something like that.
The alliance thing works something like this..
At Game start, you define a few teams. For PrenceofDarkness's demo I've defined the teams Player,vCon,Skeleton.
Then you define the initial alliances that members of those teams will have with each other when they are first created. Since we wanted vCons to team up with the Player against the Skeletons the definition was something like that:
PlayerTeam Towards VconTeam-->Ally PlayerTeam Towards skeletonTeam-->Enemy
VconTeam Towards PlayerTeam-->Ally VconTeam Towards VconTeam-->Ally //other team members VconTeam Towards SkeletonTeam-->Enemy
SkeletonTeam Towards PlayerTeam-->Enemy SkeletonTeam Towards VconTeam-->Enemy SkeletonTeam Towards SkeletonTeam-->Ally //other team members
Now let's say we create a few models. By defining the .id skill from WED we can define if the model belongs to the Player, Vcon or Skeleton Team. So we make 1 player, 2 vcons and 2 skeletons
When the models are created, the alliance Array which keeps track of all the models in the game, will look something like that:
Code:
|Player | vCon A | vCon B | Skeleton A | Skeleton B --------------------------------------------------------------------------- Player |Undefined Ally Ally Enemy Enemy vCon A | Ally Ally Ally Enemy Enemy vCon B | Ally Ally Ally Enemy Enemy Skeleton A | Enemy Enemy Enemy Ally Ally Skeleton B | Enemy Enemy Enemy Ally Ally
Now all we need to do is check this array to see if model A is Hostile or not with model B. If Skeleton A spots Vcon B around(scans him or something), he checks the Skeleton A raw and VconB column to find a field saying: 'Enemy'. So he attacks.
The beauty with this system is that alliances can take any form in the future. Since the array keeps track of individuals instead of just noting down their teams, models on the same team may go against each other, individual alliances can be made etc..
for example, the player is initially Allied with all the Guards of a village. But one day he goes loco and kills one of the Guards in plain view of two other really suprised Guards. The Guards turn hostile with the Player and charge on him. Now if the Player manages to kill both of them, although those two indvidual models turned hostile on the Alliance table, the rest of the Guards are still Allies with the player cause they have no idea what happened!
and so on..
That's really old code though.. I'm suprised it came up.. But I guess it still works ok. Prence PMed me to explain some things here about it, so i did... hope someone has fun with it..
Aris
|
|
|
Re: OKAY OKAY FINE!!! FREE AI!!
[Re: LarryLaffer]
#60027
12/09/05 20:40
12/09/05 20:40
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
That's a great idea! I was looking for something just like this a while ago, and after resigning myself to scripting it, here this comes! I think I will still script it, though, I have a lot of things dissimilar to any other script (I think... because everyone is more seisible at coding than me...). But do you mind if I nick the enemy/friend array idea?
|
|
|
Re: OKAY OKAY FINE!!! FREE AI!!
[Re: LarryLaffer]
#60029
12/10/05 06:06
12/10/05 06:06
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
@Larry Thank dude for clearing this up. @Gorthaur YA SUSE ITS ALL URS and everyones Infact if you do change anything and it's alot better then mine please show it to me I really was hopinh people would take this and update it and add to it and optimize it and all
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: OKAY OKAY FINE!!! FREE AI!!
[Re: PrenceOfDarkness]
#60030
12/10/05 07:23
12/10/05 07:23
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
Sure thing, but it might take me quite a while...
|
|
|
Re: OKAY OKAY FINE!!! FREE AI!!
[Re: ]
#60031
05/28/07 04:54
05/28/07 04:54
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
Hey guys, sorry to bring up this ANCHIENT thread... but I've gotten tons of request for my old AI contribution... sadly I don't have it any more.. my appologizes for that.. however, i'm hoping someone has a long lost copy of it.. I'll PM larry and hope he still has a copy...
hope to hear from someone soon...
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
|