Player owns a specific unit
#1 Guest_rigel6669_*
Posted 31 July 2004 - 02:49 AM
IF unit is owned by ( local player ) than
IF unit is owned by ( this player ) than
IF unit is owned by ( this players enemy ) than
I am scripting a map where the AI is coded as teamskirmish usa like in full art
of defense v10 ( 1 scripted AI vs 4 human players ).
I want the human side to win if they have captured an outpost so what player should i use to make the script work?
IF outpost is owned by ******** than
#2
Posted 31 July 2004 - 09:16 AM
To affect the human player, use <Local Player> and put the script in either the PlyrCivilian folder or the neutral folder.
<Local Player> will affect all AI players as well as human ones.
Edited by Mithril, 31 July 2004 - 09:16 AM.
#3 Guest_Guest_*
Posted 31 July 2004 - 04:31 PM
IF timer is less than 30 AND
IF outpost is owned by local player THAN
all of skirmishusa ... are dealth with a lethal amount of damage
I have tried this online with a buddy but it did not work
The script has to work when 1 of the 4 players owns the building
Any other suggestions to make it work?
#4
Posted 31 July 2004 - 08:54 PM
#5 Guest_rigel6669_*
Posted 31 July 2004 - 10:20 PM
IF outpost is owned by this enemy player THAN
all of skirmishusa ... are dealth with a lethal amount of damage
This enemy player = human players
I tried it again with a buddy online with the result that it only seem to work
if i entered the building. It does not work when my buddy takes the building.
We switched starting positions and who hosted.
There is no logic why it only worked when i entered the building
Oly the EA programers know the answer and i hereby thank them for wasting my time
I will replace "player owns a building" with something that does work
Thanks for your help Mithril
#6
Posted 01 August 2004 - 09:17 AM
Anyway, hmm the problem is that you can't refer to human players, only with the Local Player or This Player's Enemy ..is this for a mission or a skirmish map? The latter may produce mismatches..
Edited by Mithril, 01 August 2004 - 09:18 AM.
#7 Guest_rigel6669_*
Posted 01 August 2004 - 10:53 AM
been replaced with something else.
It did not mismatch online
#8 Guest_zehbaeh_*
Posted 09 August 2004 - 11:59 AM
However i've got a similiar problem.
I've tried something like the following under PlayerCivilian Folder:
IF Unit 'XYZ' is owned by '<Local Player>' then blabla
Well, this works fine in Skirmish, the Condition becomes TRUE,
but it never becomes TRUE if i watch the Replay (using -win -scriptdebug). Looks like <Local Player> does not exists in Replays or means something different. Am i right about this, and is there a solution for refering the same player in Skirmish, Multi and Replays?
Btw. English is a foreign language to me, please do not judge my "spelling" to hard
#9 Guest_Guest_*
Posted 10 August 2004 - 07:37 PM
could you please test this condition with your buddies on your 3human vs AI Map?
IF 'yourunitnamehere' is owned by 'player0'
*OR*
'yourunitnamehere' is owned by 'player1'
*OR*
'yourunitnamehere' is owned by 'player2'
THEN
#10 Guest_rigel6669_*
Posted 11 August 2004 - 12:26 AM
skirmish armies!!
Conclusion: player owns a specific unit can only be used for mission maps and
not for online art of def maps
#11 Guest_Guest_*
Posted 11 August 2004 - 07:55 AM
However, you could type in the Name i have listed above (player0...)
It will result in Questionmarks, that's for sure.
Please ignore them and try it!
For me (zehbaeh) using those players solved my problem.
I can't test it in MP, that's why i asked you for doing it.
#12
Posted 11 August 2004 - 08:34 AM
Making scripts work with human players in skirmish is always a daring endeavour: if you affect the scoring system in any way with a script it will possibly mismatch.
#13 Guest_zehbaeh_*
Posted 11 August 2004 - 01:41 PM
I have made a minimum Testmap (with a bunch of Questionmarked Scripts) which should be tested ONLINE with more than one human player.
http://3d-repro.de/dload/test02.zip
It is a 5 Player Map. Things that should happen there:
If any AI-Player captures the Repairpad in the middle all human player should be removed and vice versa.
Thx in advance.
#14
Posted 11 August 2004 - 05:04 PM
Edited by Mithril, 11 August 2004 - 05:04 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users