Computers and Spells and AI and stuff

linamus

I r bak!
Reaction score
57
Hallloooo. Let me describe the problem:

-the map is Footmen-Style map, where everyone revolves around your hero
-if the slot is occupied by the Computer - he receives full gameplay triggers, and plays, that includes casting spells on his own
-when the computer levels up, trigger automatically picks spell upgrade from spellbook
-melee AI is disabled

However...:

-when the player leaves the game, computer-triggers (not computer slot) takes his place

And since it's technically still player-controlled, hero no longer uses spells.


Any ideas on that?
 

linamus

I r bak!
Reaction score
57
Thats the point.
If the computer is set since the beginning, he will cast.
If the player leaves, the units will now be commanded via triggers - not computer interaction.
There is not actual "chaning"
 

linamus

I r bak!
Reaction score
57
A'ight, I did some searching, and now realised that there is an option to change player to computer via JASS script. Anyone knows what that is, that represents "triggering player"?
 

HydraRancher

Truth begins in lies
Reaction score
197
Well of course. It isn't going to cast abilities without you telling him to. Strangely, I've already said that. Have you got any spare slots?
 

linamus

I r bak!
Reaction score
57
It's not about the spare slots. It's about when the player leaves it gets changed to computer, thus, I'm looking for the JASS trigger
 

HydraRancher

Truth begins in lies
Reaction score
197
My point is, the alternative solution you could do is give the units to a computer in another slot and modify alliances accordingly.

Also, on a side note, where did you hear about turning a player into a computer?
 

linamus

I r bak!
Reaction score
57
Sorry for absense :p
The alternative solution wouldn't work cause all 12 slots are used at the start, so computer may not always be available.

And what I found was
Custom script: call SetPlayerController(Player(0), MAP_CONTROL_COMPUTER)

This correctly gives slot to Computer, yet he doesn't cast spells this way.

Anyone knows if AI script can bypas that?


EDIT:

Also just found out that giving the unit to neutral hostile allows him casting spells again. This ain't too good since it also dies from your own other units, unless something can be worked out

/back to research
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top