HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to stop people selling others buildings

10-19-2002, 01:53 AM#1
Guest
I have the trigger working perfectly except for one thing... you can select another players structures and sell them. I need to make it so that you can only sell your own structures.

Here is the code, can you see a way that I can fix this (it has to remain in essence the same trigger eg. escape to sell!)

Event: Player - Player 1 (Red) skips cinematic sequence
Player - Player 2 (Blue) skips cinematic sequence
etc...

Conditions: None

Actions: Unit Group - Pick every unit in (Units currently selected by (triggering player)) and do (Player - Add (Point-value of (Picked unit)) to (Triggering Player) current gold)

Unit Group - Pick ever unit in (Units currently selcted by (triggering player)) and do (Unit - Remove (Picked Unit) for the game)

So does anyone know (most likely with conditions), how to make it so that if you select a building and sell it, that it will only sell if you own it.

Please try and be as specific as possible so that I can tell whta you are going on about (eg. almost to the level of detail that I have gone to), Thanx and hope you can help :P
10-19-2002, 04:07 AM#2
ph33rb0
The first part of your Unit Group action is right, but instead of just doing Unit - Remove right away, try this:

(If ((Picked Unit) is in (Units owned by (Triggering Player))) Equal to True) Then do (Unit - Remove (Picked Unit) from the game)
10-19-2002, 05:36 AM#3
Guest
or put it directly in teh conditions
that units currently selected by triggering player belong to triggering player :)