Jump to content


Player owns a specific unit


  • Please log in to reply
13 replies to this topic

#1 Guest_rigel6669_*

Guest_rigel6669_*
  • Guests

Posted 31 July 2004 - 02:49 AM

Can some1 pls explain me the difference between the following players:

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 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 31 July 2004 - 09:16 AM

<This Player> and <This Player's Enemy> depend on where the script is located. If the script is in the SkirmishUSA folder, <This Player> is the computer that plays USA, the others are <This Player's Enemy>.

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.

Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#3 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 31 July 2004 - 04:31 PM

I have put the following script in the neutral folder:

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 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 31 July 2004 - 08:54 PM

Try putting it in the PlyrCivilian folder. Don't know why some scripts only work in that folder.
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#5 Guest_rigel6669_*

Guest_rigel6669_*
  • Guests

Posted 31 July 2004 - 10:20 PM

I have tried the following script in the skirmishusa folder:

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 :p

I will replace "player owns a building" with something that does work

Thanks for your help Mithril

#6 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 01 August 2004 - 09:17 AM

^ That is probably because skirmishusa "chose" you as its enemy. I believe <This Player's Enemy> is always an enemy, thus if skirmishusa would have defeated you, your buddy would have been the enemy.

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.

Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#7 Guest_rigel6669_*

Guest_rigel6669_*
  • Guests

Posted 01 August 2004 - 10:53 AM

It was for my new skirmish full art of defense map but as it did not work it has
been replaced with something else.

It did not mismatch online

#8 Guest_zehbaeh_*

Guest_zehbaeh_*
  • Guests

Posted 09 August 2004 - 11:59 AM

First of all, I am sorry i did not have a solution for your problem.
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_*

Guest_Guest_*
  • Guests

Posted 10 August 2004 - 07:37 PM

rigel6669
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_*

Guest_rigel6669_*
  • Guests

Posted 11 August 2004 - 12:26 AM

You can only choose: local player, this player, this player's enemy or 1 of the
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_*

Guest_Guest_*
  • Guests

Posted 11 August 2004 - 07:55 AM

Yes i now, the Dropdown shows only those players.
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 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 11 August 2004 - 08:34 AM

Unit specific scripts won't work in skirmish if that is what you are trying to solve..

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.
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#13 Guest_zehbaeh_*

Guest_zehbaeh_*
  • Guests

Posted 11 August 2004 - 01:41 PM

Maybe you are right, maybe your are not :rolleyes:
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 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 11 August 2004 - 05:04 PM

Very good! I haven't got the means to test this online (router probs grr) but I'll see if I can find someone who wants to do this.

Edited by Mithril, 11 August 2004 - 05:04 PM.

Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users