Can this be done?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Can this be done?

Post by mohaa_rox »

Working on an obj map. Can i do something like when all the allies cross over to one point, they win?
Live to map, not map to live.
-mohaa_rox, .map
moderator
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes.

You can script a 'teamwin' for everything you want.
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

What I mean is an objective whereby all the allies have to cross to one point, is that possible?
Live to map, not map to live.
-mohaa_rox, .map
moderator
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Maybe.

But what if an Allied player leaves the battle? Do the Axis win?
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

lol, right, forgot about that. :oops: :lol:
Live to map, not map to live.
-mohaa_rox, .map
moderator
jimmy
Private
Posts: 5
Joined: Fri Apr 04, 2003 8:01 pm

Post by jimmy »

why not make that allies win if only one player reach a point
similar to bridge in americas army
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

That's quite a good idea and not all that difficult to script 8)

You shouldn't use mg-42s near the bridge though :wink:

*bug*bug*bug*
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Push city hall

Post by tltrude »

You could also make it like push city hall. An allied play has to stay alive at the end point for a set amount of time to win.
Tom Trude,

Image
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post by Parts »

I think you could make both work. If only one person needs to cross then you jsut need a trigger at the win point. Set up the script thread for the trigger and then within the thread do a team win.

If all players on a team need to cross you would need to loops through all the players and test if they had crossed based on their location (origin). Below is the basis of the script, I'm sure someone could correct this to be totally accurate as I don't know the exact syntax off the top of my head for everything needed


local.AllAlliesAcross = 1

for (local.i=1;local.i<=32;local.i++)
{
local.player = $player(local.i)
//presumably only alive players need to cross?
If ((local.player.dmteam) && (IsAlive(local.player)))
{
//this I'm not sure on, how do you get the x, y , z coords? this
//is what you really want to compare
If (player.origin < $mytrigger.origin)
{
local.AllAlliesAcross = 0
}

}

if (local.AllAlliesAcross == 1)
{
lnprint "Objective complete, all surviving allies have crossed the bridge"
TeamWin allies
}
}
[VS-UK]Capt.Parts[BnHQ]
Post Reply