I am always a Historical game lover. I want to be a modder and trying too. I love COD,C&C,COH,Man 'o War,...... Hope my wish is fullfilled. I would also like to learn if anyone want to teach me about modding. Currently, I am learning COD4:MW modding.
Enemies and allies at cover_right node are not shooting at the player. But AIs at cover_stand and cover_prone are shooting perfectly. Actually not shooting at all until you go to someplace from where the enemy can see you directly. Is there any way to fix this?
Good really good. Smart Ai
Place the node further to the right from the building?
Tried, but didn't work for some reason. Still acting same.
You know you can use godmode when testing maps right?
I know but never got feelings to use it. Maybe will use it later.
you need to add pathnodes for the AI in radiant and then generate those pathnodes ingame in order for the AI to work with cover_right or cover_left. because the AI uses these only when it moves. and since you have no pathnodes then the AI can't move and as a result can't use them.
btw the cover_right and cover_left must contain direction information aiming towards the wall. you do this by using the angle function in entity editor. always make the direction arrow face to the wall.
now, you may ask how to generate pathnodes? it's easy. run the game with these parameters:
+seta thereisacow "1337" +set g_connectpaths 1
the first parameter enables cheats and the second parameter generates pathnodes for the first map you run from console. please note that your map must be in main/maps - otherwise the game will not save the generated pathnodes.
Well the map is full of pathnodes and the enemy didn't spawn at that point but further from the covernode and then moved to the cover. The direction arrow is facing toward the wall. And I ran the game that time with the parameter:
+set g_connectpaths 1. The map is in main/maps. I just want to know why the enemy is not shooting from the cover but only when I am near to it. It is also same with the ally npcs.
well, in that case i depleted obvious causes for your error. if you are willing to share your testmap files i can analyze it directly.
Drive.google.com
ok, the source of your problem is rather simple - you forgot to add the _load script into your map GSC. just add this line before your player setup line and it will be fixed:
maps\_load::main();
see fixed here: Moddb.com
The most important line of the script lol how can it be skipped?
With my little knowledge about scripting.
But it's like the first ever step before you start scripting.
Well, what can I say. First time I scripted a map in cod4, I didn't even declared library functions.
Gotta start the scripting tutorial now. Previously I avoided it because I didn't have even the basic knowledge about programming.