Jump to content
Sign in to follow this  
dmay

Flags in multiplayer

Recommended Posts

I searched for this and was surprised to not find anything relevant to my seemingly simple little problem:

In a nutshell:

How do I get a trigger to activate when the player takes his opponents flag?

The context is simple:

2 players, each with a 'locked' Scud launcher. and each with a flag for their side. When one player steals his opponents flag his Scud launcher becomes unlocked.

I know how to do everything here, (even have the scud destroy something) except trigger something when the flag is actually taken.

Share this post


Link to post
Share on other sites

You have to check the owner of the flag for example:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#start

~1

timer = timer + 1

OwnerOfEastFlags = flagowner flag1

OwnerOfWestFlags = flagowner flag2

?(_OwnerOfWestFlags == OwnerOfWestFlags):goto "start"

?(_OwnerOfEastFlags == OwnerOfEastFlags):goto "start"

_OwnerOfEastFlags = OwnerOfEastFlags

_OwnerOfWestFlags = OwnerOfWestFlags

SideOfEastFlags = side OwnerOfEastFlags

SideOfWestFlags = side OwnerOfWestFlags

?(SideOfeastFlags == West): goto "west"

?(SideOfwestFlags == East): goto "east"

goto "start"

#east

hint "Owner of flag is east"

goto "start"

#west

hint "Owner of flag is west"

goto "start"

<span id='postcolor'>

You can edit that script to unlock the vehicles.

RED

Share this post


Link to post
Share on other sites

That works a treat! Thanks Red. biggrin.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×