Jump to content


Photo

Making worldbuilder recognize when brutal AI is playing...


  • Please log in to reply
3 replies to this topic

#1 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 13 July 2018 - 02:55 AM

Hello,

I recently wanted to make a map that could be played both single-player or multiplayer, so theres no need for 2 versions. I have been able to make worldbuilder detect when theres an EASY, MEDIUM or HARD AI playing by checking if any unit has Upgrade_HardAIMultiplayer or singleplayer (easy, medium aswell). But there is absolutely nothing to detect a brutal by!!! I have spent hours trying to find a workaround, even using the brutal cost reduction trying to trigger building an unit and seeing how much money you're left with (brutal with more should be), but nothing works. Legends by Crusard did this by simply telling some goblins move to a location and check if they are there or not, but i have tried copying exactly what he did and it didnt work. Maybe im missing out something someone could help me...

 

So in short, can anyone think of a way to detect if a player is AI (on any difficulty)?


2qm3dd5.jpg


#2 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 19 July 2018 - 10:28 AM

BUMP. I'm still not finding any workaround this problem.


2qm3dd5.jpg


#3 Jokuc

Jokuc

    Hardcore Procrastinator

  • Members
  • 187 posts
  • Location:Sweden
  •  Mapper

Posted 19 July 2018 - 10:15 PM

Do you want to detect brutal specifically or AI in general - including brutal?

 

I just tried this and it didn't work for me, but maybe I'm missing something, maybe it's for bfme1.

Just make a script in each' player's script folder that checks for the flag 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 Jokuc, 19 July 2018 - 10:18 PM.


#4 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 19 July 2018 - 11:52 PM

AI in general, but i'll take brutal-only also since i found a way to make it work for the other difficulties (its pretty dumb that brutal doesnt have its own upgrade).

I already tried something like that and it didnt work, but i'll give it another try and see if there's any improvment.


2qm3dd5.jpg





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users