Need help with wierd victory

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Need help with wierd victory

Post by small_sumo »

Ok here it is, allies have to free prisoners and protect them on theyre way home.
How?
Ok first my prisoners will be reskinned german ai who will "patrol" or run home when they are triggered, same time as door to freedome is opened.They wont attack cos they will be set to blind and deaf and ememysharerange of 1, and will be none weapon.
The first bit shouldnt be too hard, open door ai will be wait trigger they will run along path to home. Just need help to get the axisvictory when either prisoners are all dead axis win (the door will be allies only) or allies victory when the first prisoner gets home.
The last part is the part that is impossible for me organising the victorys

Thanks
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I take it Allies win as soon as one prisoner has reached 'home'?

In that case, just check the distance of any bot to 'home' and make the allies win whenever this distance is smaller than e.g. 128 units. For example, start a thread for every runner:

Code: Select all

run_home_win:
    while(isAlive self && !vector_within(self.origin $home.origin 128))
        wait 0.2

   if(isAlive self)
      // within radius
      teamwin allies
end
This code uses the $home entity as 'home'. Probably you'll need a unique home for every bot though.
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

What I will do is get the skinning under way, make a test map and make it up for dl and start on the script and we will work from there. Good way to da it cos you have a tut map after you finnish. Oh and when you say bot you mean ai not jv_bot??

We will talk more, thanks for getting me started.

What do yuou think of the idea?

Anyone?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Should be ai lol sorry :oops:
Image
Post Reply