- Joined
- Mar 1, 2013
- Messages
- 555
Greetings everyone
I'm not used to custom scripts but I tried to make a trigger where it writes a name for AI players on a multiboard and gives 2 items for all player's base circle. I'm 100% sure that the trigger fires via a diffirent trigger. It should end when the current player = the total amount of players in the game.
Previously I used 'every 0.01 secs of game time' and turned of this trigger when iPlayerNumber = iPlayerCount and it worked fine.
I'm not used to custom scripts but I tried to make a trigger where it writes a name for AI players on a multiboard and gives 2 items for all player's base circle. I'm 100% sure that the trigger fires via a diffirent trigger. It should end when the current player = the total amount of players in the game.
-
CompNames
-
Events
-
Conditions
-
Actions
-
Custom script: loop
-
Game - Display to (All players) the text: ((String(iPlayerNumber)) + (__ + (String(iPlayerCount))))
-
Hero - Create Item[(Random integer number between 1 and 7)] and give it to uBaseCircle[iPlayerNumber]
-
Hero - Create Item[(Random integer number between 1 and 7)] and give it to uBaseCircle[iPlayerNumber]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Player(iPlayerNumber)) controller) Equal to Computer
-
-
Then - Actions
-
Set Temp_Int = (Random integer number between 1 and iNameCount)
-
Set Temp_Int = iNameIndex[Temp_Int]
-
Multiboard - Set the text for Multiboard item in column 2, row (iPlayerNumber + 1) to (PlayerC[iPlayerNumber] + (sNameIndex[Temp_Int] + |r))
-
Set iNameIndex[Temp_Int] = iNameIndex[iNameCount]
-
Set iNameCount = (iNameCount - 1)
-
-
Else - Actions
-
-
Set iPlayerNumber = (iPlayerNumber + 1)
-
Custom script: exitwhen udg_iPlayerNumber == udg_iPlayerCount
-
Custom script: endloop
-
-
Last edited: