View Full Version : can i make AI act like a real person?
CNC_GEN_ZH_FAN
10-08-2007, 05:40 PM
i was thinking about making ai build and create units and attack at the same pace of how i would play so i could challenge myself
i dont know how though
chaoscontrol512
10-08-2007, 09:45 PM
Clicky. (http://forums.cncden.com/showthread.php?t=21260) This is going to be really difficult to do, what I recommend doing is using timers to set intervals between each team. This is how it is done:
Script One
*** IF ***
True (what this will do is fire the script as soon as the map loads, if you don't want it to do this, then change True to whatever you want the trigger to be)
*** Then ***
Run Subroutine "Whatever you named your first subroutine, the one that does nothing, for the sake of this tutorial, I'll call it SR1."
Set Timer "Timer 1" to expire in X seconds (set X to whatever you want the delay to be before it builds the team again.
Enable Script "Script 2"
Script 2
*** IF ***
Timer 1 has expired
*** THEN ***
Run Subroutine "SR1"
Set Timer "Timer 1" to expire in X seconds
Enable Script "Script 2"
CNC_GEN_ZH_FAN
10-09-2007, 04:35 PM
b4 i type this can i just say the jeopody video is ACE the ANAL BUM gag reallymade me laugh
anyway
i want the ai to do these things
build 2 more dozers
thel be three in total i uselly have one on powerplant duty
1 on defence repair duty and one on tech advance duty (building all structures)
also i want to set a script so that if dozer gets destroyed AI will build another one
build teer 1 structures - power plant x3 close together and barracks in the front line where the enemys front attack would be
build supply structures on my map there is two supply docks near each side of base
barracks done create 2 infantry to capture defence towers at each side of base
and about 20 rocket infantry to garreson buildings next to defense towers
theres a city to middle of map and two civ structures next to the defence towers to help stop tanks
then dozer 3 build war factory
and then about 5 tanks on easy, 10 tanks on normal, 20 tanks on hard or i made a combination of tanks, flame and gattling vehicles to use.
to cram out of war factory and then they will attack me
then theres structures like missiles and lasers strikes(dont know what usa special weapon is)
wilst dozer two build base defences and dozer 1 keep power up
chaoscontrol512
10-10-2007, 06:47 PM
For building more dozers, go to the teams window, and make a new team under the AI player. Set the min and max number of units to 2, and set the unit type to a dozer.
For buildings, use the build list tool and place the buildings on the map like you would a regular building. I don't think you can get a single dozer to build only power plants.
If you've done the scripts that I told you to do, then the AI will start building teams as soon as the requisite structure is built.
To get it to build a different number of units on each difficulty level, you will need to make three different teams, one with 5 tanks, the second with 10, and the third with 20. You will need to make a seperate batch of scripts for each team, the ones I'm talking about are the ones that are in the tutorial I linked to in my first post. Each batch of scripts should only be active on easy, normal, or hard, depending on which team the scripts respond to.
As for getting infantry to garrison, name the building that you want them to garrison. Then, in the subroutine that contains the actions for the team upon completion, tell the team to garrison a specific building. I don't know how to get them to capture the artillery platforms, I've never worked with getting AIs to capture tech buildings.
Sorry if any of this is confusing. If there's anything you don't get, let me know and I'll try and explain it more clearly. ;)
CNC_GEN_ZH_FAN
10-11-2007, 05:42 PM
it is a little bit confusing especially your first post but thank you for your help what i ment by power plant duty is that i usally have 1 dozer constantly building power plants so that when i put defences up i dont lose power
i reallised that my map is too small which is a shame because i was quite proud of my effort all though some might say that it was crap
if i could some how shrink the units and buildings then it would be fine but im working on another map right now im getting ideas from Tibsun and RA2 missions
trying to edit landscapes in worldbuiler to make it look like the Tibsun or RA2 missions
i will follow your instructions and give a reply when i have done it and tested it
chaoscontrol512
10-11-2007, 08:59 PM
i reallised that my map is too small which is a shame because i was quite proud of my effort all though some might say that it was crap
You know that you can resize your map, right? It's in the File menu. One thing though, some of the trigger areas and map borders might become incorrectly placed, so check them after you resize.
A word about map borders: Everything that you want to be able to see on the map must be within the orange border, and both the orange and the blue borders must be the same size. You can change the size of the orange border by using the Border tool (the blue border cannot be changed by this method, it is changed by resizing the map. To get it to appear, press Ctrl + I, I can't remember if pressing the border button causes it to appear, but I know pressing Ctrl+I does).
I'll try and explain anything more clearly if you want me to, but I really don't have a whole lot of time (junior year's a killer), sorry about that.
CNC_GEN_ZH_FAN
10-13-2007, 02:25 PM
thank you for spending time to help me
i have managed to get the ai to build buildings by using the build list and i'am currently working on the tibsun missions for Zero Hour or Tiberium Wars by using the correct worldbuilders havent decided yet might use TW worldbuilder but ZH one doesnt take ages to load
chaoscontrol512
10-13-2007, 06:38 PM
I don't know if the Tiberium Wars and Zero Hour worldbuilders are compatible, I don't have TW so I can't really help you there.
CNC_GEN_ZH_FAN
10-15-2007, 03:34 AM
i ment making a map similar to the missions in tibsun or RA2
chaoscontrol512
10-15-2007, 11:07 PM
Yeah, that you can do. Let me know if you encounter any problems or need any more help :wave:
CNC_GEN_ZH_FAN
10-27-2007, 09:35 AM
thank you
can i also ask
is it possible to delete posts that have been put in here by me
and the only trouble i have with map editing is the terain editing it sometimes glitches up and i can never make them look good but i guess i will practise
anyway dont expect any maps anytime soon
ive decided not to do it just yet
also i need to focus on getting a job and moving out
chaoscontrol512
10-29-2007, 09:58 PM
Why would you want to delete one of your posts? A mod can do that, I don't think you can. To get the terrain to look better, I would suggest using the Smooth Height tool, but the only way to really get better is to mess around with it.
GLAFan22
12-30-2007, 08:54 PM
if you wanted the AI to act likle a person, script them how you might build in a multiplayer or skirmish game, teamwise.
And script the builds when you start building.
Here is an example of what im talking about.
X Subroutine
X Script is Active
X Deactivate upon sucsess
X means put a check in the box
**IF**
Player PlyrGLA has GT Greater Than 0 of unit or structure of type GLATankScorpion (can be anything)
**THEN**
Null Operation(Does Nothing).
Can be used with any unit on any faction. thats just my example.
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.