Scripts / Where to find if ai got hurt or damaged in all the new GG ai scripts

Author
Message
roandoom
8
Years of Service
User Offline
Joined: 24th Mar 2016
Location:
Posted: 12th Oct 2017 14:45 Edited at: 12th Oct 2017 18:18
I want to find out where is the script part where the ai get hurt from player or bomb and so forth.
i found in the combat core script a function that mentions hurt but no matter where i place a prompt it wont show of no matter how many times i shoot the soldier.-------------------------- Never mind i found what was wrong, i made copies of the soldier scripts in a ai2 folder and some of the referrals wasn't correct .


Also how can i make a a variable in the ai soldier script that only each ai soldier that has the script can work with their own variable but other ai soldiers with the same script must not be able to work with the variable.
Example : there are 2 ai soldiers with the same script and in the script it has a variable named health1 and in the script health1 becomes the ai soldier health, but the problem is when i shoot the one his health is lower than other one and they both make the variable health1 their health, i want them each to have their own variable with the same name in but cant modify each others variable even if it is the same script.

Otherwise i would have to make a script for every ai soldier that i place in my map.
PM
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 13th Oct 2017 05:31
i5 2500k 3GB GTX1060 8GB RAM Windows 10
roandoom
8
Years of Service
User Offline
Joined: 24th Mar 2016
Location:
Posted: 13th Oct 2017 11:08
Cool thanks, Ill try it out later today.
PM
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 13th Oct 2017 16:45
The health[e] = 100 part isn't really important, I just put that there to give it a value. In the 'main' section you would have something like this:
i5 2500k 3GB GTX1060 8GB RAM Windows 10
roandoom
8
Years of Service
User Offline
Joined: 24th Mar 2016
Location:
Posted: 15th Oct 2017 16:09
oh ok i git it now , by using an array and making the entity number the position of the health value, only that entity wil work with it because each entity has a unique number.

Thanks for the help.
PM

Login to post a reply

Server time is: 2024-04-19 11:01:47
Your offset time is: 2024-04-19 11:01:47