Anyone know if it is possible to get enemies to use grenades?
Anyone know what the "PRG" statement does?
Programming enemies
Re: Programming enemies
Tried it several times that they should use granades - they never did it for me.
PRG should be some of the unused things left in there for mafia
PRG should be some of the unused things left in there for mafia
Re: Programming enemies
Hello Wilson,Wilson wrote:Anyone know if it is possible to get enemies to use grenades?
i figured this out today .
I remember, that in the default mission in the Ardenes campaign (mission 3) one German soldier thrown a grenade to destroy the stug3 that i drived.
So i made a small test and i edited the 1 mission in Prague.
I created a German soldier equipped with only one stielhandgranate (inventory id 26). I ordered him to stay invisible (set visible - false) until he receives a signal to attack (wait signal suspended and set visible - true). I set his Volume to dynamic (red colour), so he could move. I created a dummy actor (detector) in front of my SAS soldier. So, when the SAS soldier gets close to the 5m range from the dummy (Player in range 5 m), the German will receive the signal to attack (send signal). Below the dummy i placed a checkpoint (user type - green colour) and i named it "granat". Then i programmed the German soldier to attack - subject granat.
I deleted other SAS soldiers to make the scene simpler and i press F6 in HDD Editor to play it. When my SAS soldier reach the dummy in the range of 5 meters, the German soldiers appeared. He started to run in my direction with a grenade in his hand. Then he throw the grenade directly on my position and i was killed.
So, as you see it is possible to program German soldiers to throw grenades only into your SAS commandos, when they appear on a certain place.
EDIT: I also just created a German soldier with grenade and i ordered him to guard. When he saw my SAS commando he thrown a grenade into his position. So, in theory when the enemy soldier has only a grenade left in his inventory he would attack you with it, otherwise he will use another weapon available. You could also set wait signal instead of wait signal suspended.
So, you could force the enemy to use grenades by choosing one of those 5 options:
--> set enemy invisible until he receives a signal from the detector (wait signal suspended) and order him to attack a named checkpoint (user type),
--> set enemy idle until he receives a signal from the detector (wait signal) and order him to attack named checkpoint (user type),
--> equipping him with a firing weapon (like MP40) then order him to use inventory (id 26 - German grenades),
--> equipping him with grenades as a primary weapon (item 0) and order him to guard,
--> equipping him only with the grenades and order him to guard.
"Who Dares Wins" - SAS motto.
Re: Programming enemies
Hey p.jakub88
have you also sometimes the Bug that the enemys are to "shy" to throw the grenade?
if you are to close or not in the right distance they dont throw the grenade. When i make the enemys head size to 0 they throw grenades like crazy but they can't aim right.
I think in FfF the A.I. was better at throwing grenades.
EDIT: PRG ist for running around the world in random directions. Good for defense maps.
have you also sometimes the Bug that the enemys are to "shy" to throw the grenade?
if you are to close or not in the right distance they dont throw the grenade. When i make the enemys head size to 0 they throw grenades like crazy but they can't aim right.
I think in FfF the A.I. was better at throwing grenades.
EDIT: PRG ist for running around the world in random directions. Good for defense maps.
Re: Programming enemies
Hello NilsZ,NilsZ wrote:Hey p.jakub88
have you also sometimes the Bug that the enemys are to "shy" to throw the grenade?
if you are to close or not in the right distance they dont throw the grenade. When i make the enemys head size to 0 they throw grenades like crazy but they can't aim right.
I think in FfF the A.I. was better at throwing grenades.
EDIT: PRG ist for running around the world in random directions. Good for defense maps.
yes i noticed, that the player need to be in the right distance from the enemy, otherwise they don't throw grenades - they will sometimes run towards you and throw grenades. Thank you for explaining the PRG.
"Who Dares Wins" - SAS motto.
Who is online
Users browsing this forum: No registered users and 7 guests