- Joined
- Apr 16, 2012
- Messages
- 48
Hey all,
I've got a major issue with my map. The map is a diplomacy type that uses a naval system I developed, a few custom models and my team and I made, a dialog UI and as of right now:
Abilities: 47
Actors: 524
Behaviors: 107
Buttons: 144
Effects: 195
Footprints: 10
Movers: 9
Requirements: 156
Turrets: 38
Units: 99
Upgrades: 75
Validators: 31
Weapons: 92
I hope the point got across that I've put a lot of work into this.
Ok now for the issue: I'm a data guy not so much a trigger guy. Right now I'm trying to re-implement an AI system for my diplomacy map.
The idea behind it is if you invade a neutral nation it will build units and fight you.
The map has 7 human players and 7 computer players. There is 1 computer player assigned to each human (ie 1-8, 2-9 etc) and that computer remains neutral to other humans unless attacked.
So whats my problem?
Well I had it working somewhat before. It would sparadically fail or work for a while and then fail but right now it isn't working at all.
Here is the relevant code as of right now:
Action Def: AI_SetPlayerAI
Anyways once the game starts and the game has confirmed there is a player for that AI, 5 seconds later it will start the AI. I know from exp that starting an AI is not limited to the map int in SC2. AI can be started inside action defs.
Now I'm at the end of my rope here and the only thing I can think of is that "Priority 5" part. Priority 5 worked before but I still don't even know what that is.
Now a dig into the MPQ's also didn't give me any enlightenment on this issue either.
So... ya... kinda in a bind here. I can't see what I'm doing wrong I just know something is wrong lol.
Can I get some help here?
And yes I will answer a few other posts to encourage myself getting some help
Edit: Well I just helped 5 others who hadn't had their problems solved yet so I hope I can get some help with mine
Thanks!
I've got a major issue with my map. The map is a diplomacy type that uses a naval system I developed, a few custom models and my team and I made, a dialog UI and as of right now:
Abilities: 47
Actors: 524
Behaviors: 107
Buttons: 144
Effects: 195
Footprints: 10
Movers: 9
Requirements: 156
Turrets: 38
Units: 99
Upgrades: 75
Validators: 31
Weapons: 92
I hope the point got across that I've put a lot of work into this.
Ok now for the issue: I'm a data guy not so much a trigger guy. Right now I'm trying to re-implement an AI system for my diplomacy map.
The idea behind it is if you invade a neutral nation it will build units and fight you.
The map has 7 human players and 7 computer players. There is 1 computer player assigned to each human (ie 1-8, 2-9 etc) and that computer remains neutral to other humans unless attacked.
So whats my problem?
Well I had it working somewhat before. It would sparadically fail or work for a while and then fail but right now it isn't working at all.
Here is the relevant code as of right now:
Action Def: AI_SetPlayerAI
-
AI_SetPlayerAI
- Options: Action, Create Thread
- Return Type: (None)
-
Parameters
- PlayerID = 0 <Integer>
- Grammar Text: AI_SetPlayerAI(PlayerID)
- Hint Text: (None)
- Custom Script Code
-
Local Variables
- tempwhilecheat = 0 <Integer>
-
Actions
- UI - Display "SetPlayerAI Fired" for (All players) to Chat area
- AI - Start the campaign AI for player PlayerID
- AI Advanced - Set the APM count for player PlayerID to 300
- Player - Modify player PlayerID Minerals: Add 999999
- AI_Research(PlayerID)
- AI_OrderScuicide(PlayerID)
- AI Advanced - Make 5 objects of type "Rifleman" in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 2 objects of type (String(Machine Gunner)) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(AT Gun (Flatbed, Construction))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(Howitzer (Flatbed, Construction))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(Light Tank (Tank Mode))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(Infantry Tank (Tank Mode))) in player PlayerID's town -1 with priority 5, even if they exist already
- UI - Display ("AI Minerals: " + (Text((Player PlayerID Minerals)))) for (All players) to Chat area
- UI - Display ("AI Supply made: " + (Text((Player PlayerID Supplies Made)))) for (All players) to Chat area
- UI - Display ("AI Supply limit: " + (Text((Player PlayerID Supplies Limit)))) for (All players) to Chat area
-
AI_OrderScuicide
- Options: Action, Create Thread
- Return Type: (None)
-
Parameters
- PlayerID = 0 <Integer>
- Grammar Text: AI_OrderScuicide(PlayerID)
- Hint Text: (None)
- Custom Script Code
-
Local Variables
- tempInt = 0 <Integer>
- tempWhileTrick = 0 <Integer>
-
Actions
-
General - While (Conditions) are true, do (Actions)
-
Conditions
- tempWhileTrick == 0
-
Actions
- AI Advanced - Make 5 objects of type (String(Rifleman)) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 2 objects of type (String(Machine Gunner)) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(AT Gun (Flatbed, Construction))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(Howitzer (Flatbed, Construction))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(Light Tank (Tank Mode))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Make 1 objects of type (String(Infantry Tank (Tank Mode))) in player PlayerID's town -1 with priority 5, even if they exist already
- AI Advanced - Train 7 units of type Rifleman in player PlayerID's town -1 with priority 5
- AI Advanced - Train 3 units of type Machine Gunner in player PlayerID's town -1 with priority 5
- AI Advanced - Train 1 units of type AT Gun (Flatbed, Construction) in player PlayerID's town -1 with priority 5
- AI Advanced - Train 1 units of type Howitzer (Flatbed, Construction) in player PlayerID's town -1 with priority 5
- AI Advanced - Train 1 units of type Light Tank (Tank Mode) in player PlayerID's town -1 with priority 5
- AI Advanced - Train 1 units of type Infantry Tank (Tank Mode) in player PlayerID's town -1 with priority 5
- AI Advanced - Train 2 units of type Armored Car in player PlayerID's town -1 with priority 5
- AI - Enable suicide for (Idle Units for player PlayerID)
- General - Wait 5.0 Game Time seconds
-
Conditions
-
General - While (Conditions) are true, do (Actions)
Anyways once the game starts and the game has confirmed there is a player for that AI, 5 seconds later it will start the AI. I know from exp that starting an AI is not limited to the map int in SC2. AI can be started inside action defs.
Now I'm at the end of my rope here and the only thing I can think of is that "Priority 5" part. Priority 5 worked before but I still don't even know what that is.
Now a dig into the MPQ's also didn't give me any enlightenment on this issue either.
So... ya... kinda in a bind here. I can't see what I'm doing wrong I just know something is wrong lol.
Can I get some help here?
And yes I will answer a few other posts to encourage myself getting some help
Edit: Well I just helped 5 others who hadn't had their problems solved yet so I hope I can get some help with mine
Thanks!
Last edited: