I'm currently making a LOTR Moria sp mod and I'm trying to work out some of the more complicated scripting. (Sorry if this is in the wrong forum but I figured that scripting is more to do with mapping than coding.)
1) How can I automatically give the player 10 health. I've come close to achiving this with 'set_damageentity -10' but it seems to increase by random numbers around 10 rather than just 10 and it also causes the player to play the 'hurt' sound effect and animation (it also occasionally increases the players shield, which I don't want).
I just want the health to increase by 10 without having to pick things up or use force powers etc. and without any reaction (I was playing around with 'set_health' trying to set it to 'get(flush,set_health) + 10' but it's not working).
2) I need the enemies to attack the player constantly, regardless of their position in the map or any structures in the way. Just as soon as they spawn to run straight for the player (no matter how far away they are) and attack.
I've tried using 'set_visrange' and 'set_earshot' but they don't seem to help, they just wait until you're really close to attack.
I think that's all for the moment. Any help would be greatly appreciated, thanks.
The following ideas are just ideas since I don't have the tools here at the office. :)
1. Try something like this: set(health, get(health) + 10). This is not exact ICARUS syntax just a sample.
2. Try setting the player as enemy and the "huntforenemies" and/or "chaseenemies" (there is a parameter like these) to true for every NPC in a script that runs right after they've spawned.
If you need more specific nstructions you have to wait until I can sit down in front of my home comp.