AI script:: "if player 2 = Comp. controlled do this action..."
#1
Posted 03 August 2010 - 07:32 AM
So I have this heroes vs waves map.. I want to make the AI smarter by putting them on tactical spots or let them heal etc.
But here is the problem 'How can I tell the engine only to do certain commandos =if= the player is not controlled by a human but for example a hard computer'.
#2
Posted 04 August 2010 - 01:57 AM
While the Skirmish Folders handle Only AI stuff
Eg in SkirmishMordor : If this player is being attacked do this Script etc...
This will only be carried out by the AI SkrimshMordor
Something like : In SkirmishMordor Folder ect
If this player is starting position 1 THEN
Edited by JUS_SAURON, 04 August 2010 - 02:09 AM.
#3
Posted 14 August 2010 - 12:28 PM
#4
Posted 14 August 2010 - 01:44 PM
#6
Posted 17 August 2010 - 12:20 PM
#8
Posted 18 August 2010 - 01:33 PM
Upgrade Upgrade_EasyAISinglePlayer
Upgrade_MediumAISinglePlayer
Upgrade_HardAISinglePlayer
Upgrade_EasyAIMultiPlayer
Upgrade_MediumAIMultiPlayer
Upgrade_HardAIMultiPlayer
If he does not then its a Human At least thats what i think...
#10
Posted 18 August 2010 - 06:12 PM
#11
Posted 30 December 2010 - 09:48 AM
*** IF *** Player Player 'Player_1' built Upgrade 'Upgrade_EasyAIMultiPlayer'. *** OR *** Player Player 'Player_1' built Upgrade 'Upgrade_EasyAISinglePlayer'. *** OR *** Player Player 'Player_1' built Upgrade 'Upgrade_HardAIMultiPlayer'. *** OR *** Player Player 'Player_1' built Upgrade 'Upgrade_HardAISinglePlayer'. *** OR *** Player Player 'Player_1' built Upgrade 'Upgrade_MediumAIMultiPlayer'. *** OR *** Player Player 'Player_1' built Upgrade 'Upgrade_MediumAISinglePlayer'. *** THEN *** Give Unit Unit 'Treb_Lv2_1' the upgrade Upgrade 'Upgrade_TrebuchetTurret'. Give Unit Unit 'Treb_Lv2_2' the upgrade Upgrade 'Upgrade_TrebuchetTurret'. Give Unit Unit 'Treb_Lv2_3' the upgrade Upgrade 'Upgrade_TrebuchetTurret'. Give Unit Unit 'Treb_Lv2_4' the upgrade Upgrade 'Upgrade_TrebuchetTurret'. Give Unit Unit 'Treb_Lv2_5' the upgrade Upgrade 'Upgrade_TrebuchetTurret'. Give Unit Unit 'Treb_Lv2_6' the upgrade Upgrade 'Upgrade_TrebuchetTurret'.
Those scripts are in Player_1 folder
I know that scipts actions are ok
Is somebody can help me please
Edited by Zdav', 30 December 2010 - 09:51 AM.
#12
Posted 31 December 2010 - 06:02 PM
If that doesn´t help I would look for something like if player has upgrade, instead of built
But my first guess is the lack of the Brutal AI Upgrades
#13
Posted 31 December 2010 - 06:26 PM
Brutal is Hard with cheats
#14
Posted 01 January 2011 - 01:21 AM
Brutal AI is missing
If that doesn´t help I would look for something like if player has upgrade, instead of built
But my first guess is the lack of the Brutal AI Upgrades
I forgot to mention that it was for WB BFME 1.
I was thinking of "has upgrade" but it does not exist :(
btw thanks for the help
#15
Posted 07 January 2011 - 10:48 AM
No more available solutions to identify AI players?
Edited by Zdav', 07 January 2011 - 10:49 AM.
#16
Posted 07 January 2011 - 11:10 AM
Though you could try this...
Check for each player if they have AI_On flag set to true or not. True means its AI
Just make a script in each' player's script folder that checks for AI_On == true
if it is true then make it set a new counter or whatever like "Player_1_AI" to 1
that way you could check which of the players are AI. So you could make scripts for each player that does whatever you want for them.
Edited by Ridder Geel, 07 January 2011 - 11:10 AM.
#17
Posted 07 January 2011 - 03:07 PM
Unfortunatly, actually it s for a map without ini modifications, ive did a multiplayer one, and i wanted to create an AI version wich one is a little improved, like managing gates, build buildings and upgrades...
I saw if add AI in "player list" that AI scripts appears as 'imported scripts" in scripts section, so there is diffenrent kind of AI and i don't know what to use, and what can i do with.
Btw take a look to my map: Middle Earth
#18
Posted 07 January 2011 - 04:53 PM
Though you could try this...
Check for each player if they have AI_On flag set to true or not. True means its AI
Just make a script in each' player's script folder that checks for AI_On == true
if it is true then make it set a new counter or whatever like "Player_1_AI" to 1
that way you could check which of the players are AI. So you could make scripts for each player that does whatever you want for them.
#19
Posted 08 January 2011 - 01:36 PM
If you simply can't find a way to do this, maybe it would work to trap a named unit in a box of ground impassible for human players (passible in the middle where the unit is) - hopefully AI players would use that unit and it would move out of the box and human players wouldn't be able to, thereby creating a possibility to differentiate between AI and human (albeit crudely). This might even work outside the visible map, making any humans blissfully aware of their trapped comrades.
Edited by Puzzler33, 08 January 2011 - 01:37 PM.
#20
Posted 11 January 2011 - 08:10 PM
I think if you do what i told up there, it might work, because those things are defined for each AI, so it should work.
Though you could try this...
Check for each player if they have AI_On flag set to true or not. True means its AI
Just make a script in each' player's script folder that checks for AI_On == true
if it is true then make it set a new counter or whatever like "Player_1_AI" to 1
that way you could check which of the players are AI. So you could make scripts for each player that does whatever you want for them.
It works perfectly!
I will able to make a singleplayer version for my map
Thanks a lot for your advice.
And good work for your mod!!! I haven't played BFME/ROTWK for years, but since i discove your mod it is one more reason for me to install it again .
Edited by Zdav', 11 January 2011 - 11:01 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users